$(element).outerWidth(true) reports differently based on theme?

elsasser

New Member
I have a jQuery script, this sets an element's width to 50% via the normal CSS width attribute. If I then output the \[code\]outerWidth(true)\[/code\] of that element to get the exact pixel value, it sometimes does not correspond to \[code\]$(window).width()/2\[/code\] - this is based on the theme that the site has. Unfortunately I cannot bring a demo for this behavior online.Is there any specific CSS attribute that might cause such a difference? The problem is that the \[code\]outerWidth()\[/code\] is reporting for example, \[code\]564px\[/code\], but when I check in Safari inspector, it says \[code\]580\[/code\]. So the return of that function is incorrect and I'd like to be able to know what is the cause.Demo: http://users.telenet.be/prullen/this/http://users.telenet.be/prullen/that/The content (gray area when you click on the red tab) is supposed to be hidden on load via a negative margin, but due to the (incorrect?) return of jquery, it is not in one of these themes (showing slightly).console.log calls are : \[code\] console.log('window width / 2 = ' + $(window).width()/2); console.log('doc width /2 = ' + $(document).width()/2); console.log('width = ' + defaults.boxWidth); console.log('width = ' + $slider.css('width')); console.log('width = ' + $slider.width()); console.log('width = ' + $slider.outerWidth()); console.log('width = ' + $slider.outerWidth(true));\[/code\]
 
Top