Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
  1. Code
  2. Web Development

jQuery Succinctly: jQuery and the Web Browser

This post is part of a series called jQuery Succinctly.
jQuery Succinctly: Events & jQuery
jQuery Succinctly: jQuery Plugins

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.

Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.