jquery add width to element via code code example Example 1: jquery set width $(".example").width("px"); Example 2: get width of div jquery $("#divId").width();