Use jQuery to Remove the Width or Height Attribute From an Object

1/13/2015 1:33:43 AM

If you use jQuery to set the width of an object to a specific pixel, you can reset the width or remove the pixel setting using the following.

//set the width
$("#myObjectId").width("125");

//remove the width
$("#myObjectId").css('width', 'auto');