Question

I am using the ui.selectmenu plugin found here: https://github.com/fnagel/jquery-ui/wiki/Selectmenu

I am all of a sudden seeing a bug in one of my pages and I can't replicate it anywhere else. I have never seen this bug so it's driving me nuts. I'm going to try and fiddle this but was wondering if anyone can recognize this issue:

$('#classname-menu').css('top');    // returns 839.46px
$('#classname-menu')[0].style.top;  // returns -858154px

If I run $('#classname-menu').css( 'top', '839.46px' ); it moves to the right place.

Was it helpful?

Solution 2

If I remember correctly, my version of jQuery UI fell behind jQuery by too much. I was slowly upgrading parts of my site with jQuery core and I think the page I spoke of was one of the first upgraded with selectmenu so I didn't think of UI being behind at the time. Just something to be on the lookout for when upgrading a site page-by-page.

OTHER TIPS

I'm the maintainer of this widget and would really like to help out here. Perhaps you are able to post a jsFiddle or a link to your page?

Positioning problems are often caused by problems with the focus, especially in IE as this great peace of software has problems with positioning and overflow. Please try if it helps to disable overflow and please make sure you are using the latest (tagged aka "stable") release. Please feel free to open a new issue on GitHub.

If nothing helps and you are able to, I would advise you to test the new, built from scratch version of jQuery UI Selectmenu which can be found in the offical jQuery UI Github account (selectmenu branch).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top