jQuery Succinctly: jQuery and the Web Browser

Disabling the Right-Click Contextual Menu

Using JavaScript, you can disable the browser's native right-click contextual menu. Doing so with jQuery is a snap. We simply cancel the contenxtmenu event.


Scrolling the Browser Window

While there are numerous plugins for scrolling the browser window, doing so can be trivial when a simple scroll is required. By setting the scrollTop CSS property on the <html> and <body> elements, it is possible to control the position of the horizontal or vertical scrolling. In the code below, I use the animate() method to animate the horizontal scrolling to a specific element in the page.

Tags:

Comments

Related Articles