diff options
Diffstat (limited to 'core/js/singleselect.js')
-rw-r--r-- | core/js/singleselect.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/js/singleselect.js b/core/js/singleselect.js index c22b5232207..1b2016aabb9 100644 --- a/core/js/singleselect.js +++ b/core/js/singleselect.js @@ -2,10 +2,14 @@ $.fn.singleSelect = function () { return this.each(function (i, select) { var input = $('<input/>'), + gravity = $(select).attr('data-tipsy-gravity'), inputTooltip = $(select).attr('data-inputtitle'); if (inputTooltip){ input.attr('title', inputTooltip); } + if (typeof gravity === 'undefined') { + gravity = 'n' + } select = $(select); input.css('position', 'absolute'); input.css({ @@ -35,7 +39,7 @@ input.css(select.offset()); input.show(); if ($.fn.tipsy){ - input.tipsy({gravity: 'n', trigger: 'manual'}); + input.tipsy({gravity: gravity, trigger: 'manual'}); input.tipsy('show'); } select.css('background-color', 'white'); @@ -83,6 +87,10 @@ $(this).tipsy('hide'); } }); + input.click(function(ev) { + // prevent clicks to close any container + ev.stopPropagation(); + }); }); }; })(jQuery); |