EDITABLE CODE:
LiveDemo:jQuery - width() and height() Method using function
Note: The function is used to insert HTML and text content on matched elements.