Always set outerWidth() and outerHeight() param
An older version of jQuery UI will return a jQuery object -- not the integer your script is expecting -- if you don't set the parameter value for outerWidth() or outerHeight().
Reference: http://bugs.jquery.com/ticket/12491
Both functions have one parameter, includeMargin, which is set to false by default. To play it safe (and avoid some befuddled head scratching down the road), call the functions like this:
outerWidth(false) // The default
outerWidth(true)
outerHeight(false) // The default
outerHeight(true)Written by Eric Daams
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery plugins
Authors
hnordt
2.101K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#