Jquery implements the special page turning effect on the left and right of the keyboard and jquery page turning Effect
The left and right pages of the jquery keyboard are displayed. When there is no previous or next page, pressing the keyboard does not respond, avoiding incorrect jumps.
HTML code
<P> previous article: <a id = 'pre' href = 'HTTP: // www.daimajiayuan.com/sitejs-17294-1.html'> a page layout that fades in along with the scroll bar </a> </p> <p> next article: <a id = 'Next' href = 'HTTP: // www.daimajiayuan.com/sitejs-18339-1.html'> click the check box to add or delete the value to the input box. </a> </p>
Jquery code
$ (Document ). ready (function () {var prevpage = $ ("# pre "). attr ("href"); var nextpage = $ ("# next "). attr ("href"); $ ("body "). keydown (function (event) {if (event. keyCode = 37 & prevpage! = Undefined) location = prevpage; if (event. keyCode = 39 & nextpage! = Undefined) location = nextpage ;});});
The above is all the content of this article. I hope you will like it.