Last Updated: February 25, 2016
·
780
· ericnicolaas

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)