jQuery Getting and setting width and height of an element Getting and setting width and height (ignoring border)


Example

Get width and height:

var width = $('#target-element').width();
var height = $('#target-element').height();

Set width and height:

$('#target-element').width(50);
$('#target-element').height(100);