How to check JQuery datatable version


    var versionNo = $.fn.dataTable.version;


Asc/Desc tooltip on sorting columns?


if (($(this).hasClass(‘sorting’)) || ($(this).hasClass(‘sorting_desc’))) {
$(this).attr({title: ‘Sort Ascending’});
} else {
$(this).attr({title: ‘Sort Descending’});




Button type “button” vs. “submit”

The type of the button. Possible values are:

  • submit: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.
  • reset: The button resets all the controls to their initial values.
  • button: The button has no default behavior. It can have client-side scripts associated with the element’s events, which are triggered when the events occur.



jquery detect textbox value change NOT based on user input

var $myText = $(“#myText”); $“value”, $myText.val()); setInterval(function() { var data = $“value”), val = $myText.val(); if (data !== val) { $“value”, val); alert(“changed”); } }, 100);