Handy Function to check if jQuery Datatable exists

jQuery Datatable is a powerful jQuery plug-in used to display the data in listing at front-end. These datatables handle our data to show in a user friendly manner and provide lot of features to use like sorting, searching, paging, and export to different types of file and print. jQuery datatable provides all these features in very user-friendly and easier to use manner. But while using such DataTable, first we need to check if that jQuery DataTable instance exists or not.

Read More

4 ways to fix – Cannot reinitialize jQuery DataTable

jQuery DataTable is very user-friendly & provides a lot features and is easier to use. But when we use jQuery DataTable, we face a unique type of alert message (Cannot reinitialize JQuery DataTable). These DataTables show the data in listing at front-end and in an good user friendly manner. It also provides features to use like sorting, searching, paging, and export to different types of file and print.

Read More

jQuery focus not working in Chrome

Sometimes before I faced a issue the jQuery focus not working in Chrome and in Mozilla It was working fine. I have google the issue and came up with a solution. Same solution I am explaining here so that It can be useful for developers.

Read More

How to set scroll position to bottom in a div using javascript

Generally we create a div with the content and dynamically update the content. Further, we want to maintain the scroll position according to updated content. So there is one question of how to set scroll position to bottom in a div using JavaScript. Same type of problem I faced few days ago when I was working with a ajax message application and I am trying to get a div to scroll to the bottom when chat is updated.

Read More

escaping special characters in jQuery selector

jQuery is a very powerful javascript library that We use all the time. It’s simple to use, yet easy enough to do very advanced things. Anyone who has used jQuery knows that you can do quite a lot with selectors. One of the caveats that I found is using a selector for a DOM element that contains special characters.

Read More

Getting Class or Id of element that fired an event

In jQuery we sometimes need to find class or Id of element that fires an event in a web page. This simple code below will do the job for getting Class or Id of element that fired an event in jQuery.

First of all we need jQuery so you need to add self hosted jQuery or one from available CDNs. I’m getting it from Google here.

Read More

[ Page 1 of 7 ]