Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6844087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:19:59+00:00 2026-05-27T00:19:59+00:00

I’m using jQuery UI Select Menu and occasionally have some issues. This is located

  • 0

I’m using jQuery UI Select Menu and occasionally have some issues.

This is located at the top left of my users’ pages. Using the “dropdown/address” type, sometimes (seemingly random), the dropdown opens UP instead of DOWN, and you can’t select any options in it except the first one because it’s all “above” the screen.

Anyone know of a setting/option in there to force it to open down? Thanks!

update…. 11/23/11 1:11pm est
Here is some code of the call:

$(function(){
            $('select#selectionA').selectmenu({
                style:'dropdown', 
                menuWidth: 220,
                positionOptions: {
                    collision: 'none'
                },
                format: addressFormatting
            });
        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:20:00+00:00Added an answer on May 27, 2026 at 12:20 am

    The plugin uses the Position utility of the jQuery UI library. If you look at the default options in the source of the plugin, there is a positionOptions property that is used in the function _refreshPosition():

    options: {
        transferClasses: true,
        typeAhead: 1000,
        style: 'dropdown',
        positionOptions: {
            my: "left top",
            at: "left bottom",
            offset: null
        },
        width: null,
        menuWidth: null,
        handleWidth: 26,
        maxHeight: null,
        icons: null,
        format: null,
        bgImage: function() {},
        wrapperElement: "<div />"
    }
    
    _refreshPosition: function() {
        var o = this.options;
    
        // if its a pop-up we need to calculate the position of the selected li
        if ( o.style == "popup" && !o.positionOptions.offset ) {
            var selected = this._selectedOptionLi();
            var _offset = "0 " + ( this.list.offset().top  - selected.offset().top - ( this.newelement.outerHeight() + selected.outerHeight() ) / 2);
        }
        // update zIndex if jQuery UI is able to process
        this.listWrap
            .zIndex( this.element.zIndex() + 1 )
            .position({
                // set options for position plugin
                of: o.positionOptions.of || this.newelement,
                my: o.positionOptions.my,
                at: o.positionOptions.at,
                offset: o.positionOptions.offset || _offset,
                collision: o.positionOptions.collision || 'flip'
            });
    }
    

    You can see it uses a default value 'flip' if none is provided for the collision option of the position utility which is. According to jQuery UI documentation:

    flip: to the opposite side and the collision detection is run again to see if it will fit. If it won’t fit in either position, the center option should be used as a fall back.
    fit: so the element keeps in the desired direction, but is re-positioned so it fits.
    none: not do collision detection.

    So i guess you could pass an option when initializing the plugin to define none for the collision option:

    $('select').selectmenu({
        positionOptions: {
            collision: 'none'
        }
    });
    

    Have not tested yet, this is just by looking at the code.


    Edit following comment

    I’ve noticed that the version of the javascript available on github and the one used on the plugin website are not the same. I don’t know which one you are using but the one used on the website does not have a positionOptions option actually, so it has no effect to specify it when calling selectmenu().
    It seems it’s not possible to link directly to the javascript on the site so here’s some code to illustrate:

    defaults: {
        transferClasses: true,
        style: 'popup', 
        width: null, 
        menuWidth: null, 
        handleWidth: 26, 
        maxHeight: null,
        icons: null, 
        format: null
    }
    
    _refreshPosition: function(){   
        //set left value
        this.list.css('left', this.newelement.offset().left);
    
        //set top value
        var menuTop = this.newelement.offset().top;
        var scrolledAmt = this.list[0].scrollTop;
        this.list.find('li:lt('+this._selectedIndex()+')').each(function(){
            scrolledAmt -= $(this).outerHeight();
        });
    
        if(this.newelement.is('.'+this.widgetBaseClass+'-popup')){
            menuTop+=scrolledAmt; 
            this.list.css('top', menuTop); 
        }   
        else { 
            menuTop += this.newelement.height();
            this.list.css('top', menuTop); 
        }
    }
    

    I was able to make it work as I first described with the version from github. In my opinion it is a more recent/complete version. Besides it was updated a few days ago.

    I have created a small test page with two selects. I’ve changed for both the position for the dropdown to show above.
    The first one does not specify the collision option, thus ‘flip’ is used and the dropdown displays below because there is not enough space above.
    The second has ‘none’ specified and the dropdown shows above even if there is not enough space.

    I’ve put the small test project on my dropbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have thousands of HTML files to process using Groovy/Java and I need to
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.