jQuery anyone?

0 favourites
  • 5 posts
  • I couldn't get C2 to look propperly as a Navigation Bar on my Website.

    So now I am learning a .js and a bit jQuery.

    I Kinda just ripped an existing script and now I am trying to make it work for me:

    <script type="text/javascript" src="jquery.js"></script>

    <script type="text/javascript">

       $(document).ready(function(){

       $('dota').click(function(){

        

         });

            $('#Homebutton').toggle(function(){

                $('.animateme').html('<img src="Construct2/Images/Gnoll_Running.gif" />');       

                $('.animateme').animate({

                   left: '+=150',

                }, 800, function() {

                   $('.animateme').html('<img src="Construct2/Images/Gnoll_Hit.gif" />')

                   

                        $('.animateme') .html('<img src="Construct2/Images/Gnoll_Resting_smaller.gif" />');

                        

                        

                });

            }, function(){

                $('.animateme').html('<img src="Construct2/Images/Gnoll_Running_left.gif" />');

                $('.animateme').animate({

                   left: '-=500',

                }, 2200, function() {

                   $('.animateme').html('<img src="Construct2/Images/Gnoll_Resting_smaller.gif" />');

                });

            });

              

              

        });

    </script>

    The script makes the "Gnoll" Move

    But the

    $('.animateme').html('<img src="Construct2/Images/Gnoll_Hit.gif" />')

    Is supposed to come before the "Resting" Animation...

    .delay(2000) didn't work for me.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • vailla-guides.com for the tiny animation

  • The Scirra forums is not the best place to ask programming questions. Can I recommend StackOverflow?

  • Already posted there :p

    Just doubling my chances lol.. sorry^^

  • OK, closing this thread - best take it up on StackOverflow.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)