WordPress.org

Ready to get started?Download WordPress

Forums

Jellyfish Invaders
[resolved] Action on click on the Sprite (3 posts)

  1. GRoncari
    Member
    Posted 5 months ago #

    I have another question: would it be possible to add a "click on" event on the sprites?

    I would like for the user to click on the Invaders and be sent to a specific URL. How do I manage that?

    Thanks!

    https://wordpress.org/plugins/jellyfish-invaders/

  2. GRoncari
    Member
    Posted 5 months ago #

    OK, I was able to do that myself with the help of my friend Lorenzo Ridi.

    To make the INVADER clickable we added to the jellyfish_invaders.php file:

    $script.="jQuery('#invader$count').on('click',function(){window.location ='[YOUR_URL]'});\n";

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Thanks anyway!

  3. Strawberry Jellyfish
    Member
    Plugin Author

    Posted 4 months ago #

    Great tip :)

    I hadn't considered having an onclick event. Might look into making this a feature in a future version.

Reply

You must log in to post.

About this Plugin

About this Topic