New Function disableToggle to toggle disable on and off similar to slideToggle
This function can be called as
where element_id is the id of the element.
For e.g.,
/*********************
Function:disableToggle
author:Mukesh
License: Void of any license
**********************/
$.fn.disableToggle = function() {
if(($(this).attr("disabled")=="disabled") ($(this).attr("disabled")==true))
{
$(this).removeAttr("disabled");
}
else
{
$(this).attr("disabled","disabled");
}
};
This function can be called as
$("#element-id").disableToggle();
where element_id is the id of the element.
For e.g.,
$("#edit-name").disableToggle();
Comments