Search Results

Search found 1 results on 1 pages for 'rayrule'.

Page 1/1 | 1 

  • JQuery with css3 keydown keyCode = 37 and 39

    - by rayrule
    I have tested both ways. jquery animation and css3 transition, and css3 is a little bit faster. But i have a problem with the following code: $(document).keydown(function(e){ if (e.keyCode == 39) { var DocHeight = $(document).height(); $('.container').css("margin-top","-="+DocHeight) } }); if i hit twice on keyCode 39 (arrow to the right) than my transition is outer space. Does anyone has an solution for this thing? outer space maybe not the correct word. But the problem is. if i hit twice the arrow key i'll get the last request, in other words... animation is started, and another animation start from the position that i don't want. example: hit #1 margin-top is at 0px and goes to 1024px. but when i hit it twice the margin-top is at 23px, and it stops at 1047px. This is not what i want. It has to stop at 1024px. I hope so.

    Read the article

1