Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery - Link after .animate
    primarykey
    data
    text
    <p>I'm trying to make my code follow a link after an animation has run.</p> <p>The idea is that the "Gnoll" hits the button for you and that will send you to the link.</p> <p>This is my Code so far: </p> <p>It has not the Link inside it.</p> <p><em>(Also, the button color is supposed to change about halfway through the "Hit" animation. So far I have failed on that one)</em></p> <pre><code>$(document).ready(function(){ $('.Homebutton').click(function(){ $('.animateme').html('&lt;img src="Construct2/Images/Gnoll_Running.gif" /&gt;'); $('.animateme').animate({ left: '+=150', }, 800, function() { $('.animateme').html('&lt;img src="Construct2/Images/Gnoll_Hit.gif" /&gt;'); }); $('.animateme').animate({ left: '+=0', }, 500); $('.animateme').animate({ left: '+=0', }, 500, function() { $('.animateme') .html('&lt;img src="Construct2/Images/Gnoll_Resting_smaller.gif" /&gt;'); }); }); $('#AddOnbutton').click(function(){ $('.animateme').html('&lt;img src="Construct2/Images/Gnoll_Running.gif" /&gt;'); $('.animateme').animate({ left: '+=250', }, 1000, function() { $('.animateme').html('&lt;img src="Construct2/Images/Gnoll_Hit.gif" /&gt;') }); $('.animateme').animate({ left: '+=0', }, 1000, function() { $('.animateme') .html('&lt;img src="Construct2/Images/Gnoll_Resting_smaller.gif" /&gt;'); $("#AddOnbutton").html('&lt;img src="Construct2/Images/redbutton.png" /&gt;'); }); }); }); </code></pre> <p>The code is very base as you can see. The link should be triggered about 0.5 sec after the last </p> <pre><code>$('.animateme') .html('&lt;img src="Construct2/Images/Gnoll_Resting_smaller.gif" /&gt;'); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload