Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts
Wednesday, September 9, 2015
How to check array in jQuery
var dataarray = ["1", "2", "3"];
if ( $.inArray('1', dataarray) > -1 ) {
alert("checked");
}
Monday, August 24, 2015
How to remove function from a jQuery object
The function can be removed from a previously-attached event handler.
eg. Remove submit function from a form element.
$('form[name="formname"]').unbind('submit');
Subscribe to:
Posts (Atom)