Attach onclick event to a different button

Permalink Browser Info Environment
Hi. Really like this add-on - it's great fun!

Is there a way to attach an on-click event to a different object / button that will activate the raptor? I want to add it to my nav rather than have a separate button...

Thanks!

Type: Discussion
Status: In Progress
simonchilton
View Replies:
Mnkras replied on at Permalink Reply
Mnkras
Yes you can, if you load the js you can do something like the following:

<script type="text/javascript">
      $(window).load(function() {
         $('<class or id here>').raptorize({       
            enterOn : "click",
            img : "/packages/raptorize/blocks/raptor/raptor.png",            
            mp3 : "/packages/raptorize/blocks/raptor/raptor-sound.mp3",
            ogg : "/packages/raptorize/blocks/raptor/raptor-sound.ogg"
         });
      });
</script>


and replace the <class or id here> with the class or ID you want to activate.

Mike
simonchilton replied on at Permalink Reply
simonchilton
Excellent, worked a treat, thanks so much!

Simon.

concrete5 Environment Information

n/a

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.