tags:

views:

667

answers:

2

I am trying to use the goTo function to rotate between images, here is my basic JS:

<script type="text/javascript" charset="utf-8"> 
          $.jQTouch(); 
          $(function () { 
            $('.touch').live('swipe', function (event, info) { 
              alert('called' + info.direction); 
              var id = $(this).parent().next().attr("id"); 
              alert(id); 
              $.jQTouch.goTo(id, 'slide'); 
            }); 
          }); 
 </script> 

This works great up until I get to the $.jQTouch.goTo(id, 'slide');

line and then I get the following error:

$.jQTouch.goTo is not a function 

How do I access this goTo function?

A: 

Goto is for switching between pages, not for image rotations. You'll have to write your own function for that. That's not where jQTouch is made for.

Bastiaan Linders
The image is in a different div that I want to slide in, I still need an answer to the question above
Slee
A: 

forgot to instantiate the var for me to use in my code - DOH!

   var jQT = new $.jQTouch();
Slee