Archive for November, 2016

Snippets: Disable Scroll Using jQuery

Most developers probably wouldn't want to disable scroll on their pages, but of course, there are always exceptions to any rule, and there are a number of reasons that scroll may need to be disabled. It could be for design or functionality reasons, or it could just be the result of a click event or […]

jQuery: Enable Click Event for Some Anchor Elements

jQuery provides a very easy way to disable click events for any DOM element. And you can also disable click event for all Dom elements with few lines of code. But then what if you want to enable click event for some elements? For example, if a click event is disabled for all anchor elements, […]

jQuery’s .attr() Method

In jQuery, the attribute or .attr() method is used to set the attributes values of selected elements. It works similarly to the .css() method, except with .attr(), you're not setting or changing the style rules, but the inline HTML attributes of a particular element. Common HTML attributes that can be altered are width and height, […]

jQuery’s .find() Method

In jQuery, the .find() method is used to return descendent elements of the selected element. Basically, you can use it when you want to apply jQuery to all the descendants of a particular element. You can also do this by selecting them by classes and ids, but sometimes if there are many different classes, ids, […]