1 Reply Latest reply on Jun 3, 2013 2:15 PM by Zaxist

    Trying to use external jquery script

    Marlene Level 1

      I have a rectangle on the page with the id of Rectangle

      I have the following code on the document.compositionReady function:

      yepnope({

      nope:["jquery.scrollTo.js",],

      complete: init

      });

       

       

      Then I have coded the init function:

           $('body').scrollTo(500);

      which in fact scrolls the page

       

      BUT THIS

      sym.$('Rectangle').scrollTo(500);

      DOES NOT WORK

       

      why?

        • 1. Re: Trying to use external jquery script
          Zaxist Level 4

          if you want to scroll the Stage by click on Rectangle you should do code this way

           

          yepnope({nope:[

                                          'jquery.scrollTo.min.js',

                                 ],complete: init});

          function init (){

           

          sym.$("Rectangle").click(function(){

                                                              $.scrollTo( { top:800,left:700} , 800 );

                                                             })

          }

           

          Zaxist