Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic location of dropdown #36

Open
ghost opened this issue Mar 4, 2012 · 0 comments
Open

dynamic location of dropdown #36

ghost opened this issue Mar 4, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 4, 2012

i'm using the anchor tag with padding to determine the height of the select box. as currently coded, the plugin pulls the height from $containerDiv before there is any text in it. this leads to a height which consists of the top+bottom padding, and leads to the "top" being set incorrectly when positioning SSContainerDivWrapper.

i switched the order of the following two statements to get it to work: essentially putting something in the selectTxt before taking the height of the surrounding div.

            //check if a value is selected
            if (currentIndex != -1){
                navigateList(currentIndex);
            } else {
                //set placeholder text
                $containerDivText.text(opts.defaultText);
            }

            //get heights of new elements for use later
            var newUlHeight = $newUl.height(),
                containerHeight = $containerDiv.height(),
                newLiLength     = $newLi.length;

cheerio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants