For jQuery 1.6 or above there is prop() function and lower jQuery versions have attr() function which can be used to disable or enable an input field. Further more DOM object’s disabled property also works with any version of jQuery to disable or enable an input field.
Tag » Functionality
4 ways to empty an array in JavaScript
JavaScript arrays are commonly used by developers and making them empty is also used in practice. Here I am describing 4 ways to empty an array in JavaScript:
1. Use splice() method
2. Set length to zero
3. Using pop() method
4. Set array to new empty array
Check or Select / Deselect all Checkboxes using jQuery
Either newbie or experienced developer, everyone occasionally needs a quick jQuery snippet that selects and deselects multiple checkboxes by clicking “Select All” checkbox (exactly like in Gmail). Here are two code snippet that perform the same action. You can use either of them.
We are creating two functions (in each code snippet).
Query to obtain rank function in MySQL
There is no rank function in MySQL actually, whenever you need to query rank from table based on some functionality/criteria in MYSQL. But there are simple queries that can be used to perform the same.
Read the article to create query as well as to know about equivalent query for RANK and DENSE_RANK in MySQL.
WordPress custom breadcrumbs without plugin
Breadcrumbs are the important part of every website for easy navigation. Here is a simple WordPress custom breadcrumbs without plugin code which you can copy paste and paste to `functions.php` file of your active theme.
More ever you will also find some easily configurable options to modify breadcrumbs to match your site’s look in this WordPress custom breadcrumbs.
Arrow on scrolling the page using jquery
Sometimes we faced the problem on scrolling the content on the page and go to the bottom of the page and feel we need to go on top of the page.
For that we need to scroll the page again which is irritating. If there would be any option to click on which we can jump to top of the page easily seems good.