Im building a draggable map that when the map is dragged the element is given a \'left\' and \'top\' attribute with values for each as so...
$.fn.removeCss=function(prop){ if(!prop){ return $(this).removeAttr('style').removeAttr('class'); } else{ return $(this).css(prop,null); } }
then if you want to remove css prop(s) :
$('#mydiv').removeCss('color'); //To remove all prop Css $('#mydiv').removeCss();