[jQuery] Re: cycle plugin with keyboard

2009-05-23 Thread runrunforest
I get it to work now, just change the selector "window" to "document", The IE really has no idea what "window" is LOL. The working code $(document).keydown(function(e){ if(e.which == 37){ $('.prev').click();} else if(e.which == 39){ $('.next').click();} })

[jQuery] Re: cycle plugin with keyboard

2009-05-22 Thread runrunforest
its IE 7 On May 22, 9:13 pm, "ryan.j" wrote: > possibly keycode vs. charcode. did you try the keypress thingy on > quirksmode to see what IE returns on keydown? > > which version of IE isn't it working? > > On May 22, 3:10 pm, runrunforest wrote: > > > thanks > > > I got this to work in all bro

[jQuery] Re: cycle plugin with keyboard

2009-05-22 Thread runrunforest
thanks I got this to work in all browser except... IE. The code i used $(window).keydown(function(e){ if(e.which == 37){ $('.prev').click();} else if(e.which == 39){ $('.next').click();} }); What makes IE not understand this ? On May 22, 3:15 pm

[jQuery] Re: cycle plugin with keyboard

2009-05-22 Thread ryan.j
possibly keycode vs. charcode. did you try the keypress thingy on quirksmode to see what IE returns on keydown? which version of IE isn't it working? On May 22, 3:10 pm, runrunforest wrote: > thanks > > I got this to work in all browser except... IE. > > The code i used > >         $(window).ke

[jQuery] Re: cycle plugin with keyboard

2009-05-22 Thread ryan.j
take a look here -> http://www.quirksmode.org/js/keys.html 37: left 38: up 39: right 40: down irritatingly, i completely forgot the arrow keys are a special case, and won't trigger properly (or even consistently) the keypress event across different browsers. try keydown or keyup to catch the cha

[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread runrunforest
the all the arrow has charcode of "0" (zero). I know this by the code var key = e.which; alert(key); So how the script which is right arrow which is left arrow. On May 21, 10:51 pm, "ryan.j" wrote: > yeah, stick this in document ready. > > to simulate the click, get the id of element you'd nor

[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread ryan.j
yeah, stick this in document ready. to simulate the click, get the id of element you'd normally click to advance the scroller (inspect it with the mozilla plugin firebug) and append .click() On May 21, 4:45 pm, runrunforest wrote: > could you give some further tip, how can I simulate, where sho

[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread runrunforest
could you give some further tip, how can I simulate, where should I put the code to (document.ready part ?). On May 21, 10:28 pm, "ryan.j" wrote: > $(window).keypress(function (e) { >   if (e.which == 39 ) { >     /* keypress right */ >   } elseif (e.which == 37 ) { >     /* keypress left */ >  

[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread ryan.j
$(window).keypress(function (e) { if (e.which == 39 ) { /* keypress right */ } elseif (e.which == 37 ) { /* keypress left */ } else { return false; } }); if you can't figure out how to advance the cycle on your own, maybe try to simulate $('#scrollLeft').click() On May 21, 2:

[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread ryan.j
bind keypress to a check for the charcode/keycode and if your condition is met, pass the js to load the next img? $(document).keypress(function (e) { if (e.which == 32 ) { /* advance scroller! */ } }); ( lots of interesting stuff on this sort of thing at --> http://www.quirksmode

[jQuery] Re: cycle plugin with keyboard

2009-05-21 Thread Mike Alsup
The plugin does not provide support for keyboard nav. You'd have to implement it yourself. On May 20, 9:48 pm, runrunforest wrote: > In cycle plugin, ss there way to switch images by keyboard arrows > instead of clicking "next, prev"

[jQuery] Re: cycle plugin with keyboard

2009-05-20 Thread victor kobs
see this web site www.stunicholls.com in gallery section...