jquery get width of element code example
Example 1: jquery get element width
$('#element').width();
Example 2: jquery set width
$(".example").width("px");
Example 3: get width of div jquery
$("#divId").width();
Example 4: jquery element width
// Returns width of HTML document
$( document ).width();
Example 5: jquery get width of element
$("button").click(function(){
var txt = "";
txt += "Width: " + $("#div1").width() + "</br>";
txt += "Height: " + $("#div1").height();
$("#div1").html(txt);
});