Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Update jquery.tokeninput.js #650

Merged
merged 1 commit into from
Mar 18, 2014
Merged

Update jquery.tokeninput.js #650

merged 1 commit into from
Mar 18, 2014

Conversation

joaofgf
Copy link
Contributor

@joaofgf joaofgf commented Mar 18, 2014

After jQuery 1.9, the function jQuery(this).outerHeight() returns an object.
So, to use this script on 1.9+ jquery you need to change the function show_dropdown() and add a 'true' parameter in order to work properly.

function show_dropdown() {
    dropdown
           .css({
                position: "absolute",
                top: $(token_list).offset().top + $(token_list).outerHeight(true),
                left: $(token_list).offset().left,
                zindex: 999
            })
            .show();
}

Since this change will not affect previous jquery versions (tested with 1.7) it should be added to the dist.

Enjoy.

hugohenrique added a commit that referenced this pull request Mar 18, 2014
Update jquery.tokeninput.js "update the outerHeight(true)"
@hugohenrique hugohenrique merged commit a299ad6 into loopj:master Mar 18, 2014
@hugohenrique
Copy link
Collaborator

Thanks @joaofgf

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

Successfully merging this pull request may close these issues.

2 participants