Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

adjust the position of autocomplete container #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions jquery.smart_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,14 @@
//show the results container after aligning it with the field
if(results_container){
if(options.alignResultsContainer){
var zIndex = results_container.css("z-index");
zIndex = isNaN(zIndex) ? 1000 : zIndex;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this line is needed?

results_container.css({
position: "absolute",
top: function(){ return $(context).offset().top + $(context).height(); },
top: function(){ return $(context).offset().top + $(context).outerHeight(); },
left: function(){ return $(context).offset().left; },
width: function(){ return $(context).width(); },
zIndex: 1000
width: function(){ return $(context).outerWidth(); },
zIndex: isNaN(zIndex) ? 1000 : zIndex
})
}
results_container.show();
Expand Down