|
|
|
@ -2,10 +2,14 @@ |
|
|
|
|
$.fn.singleSelect = function () { |
|
|
|
|
return this.each(function (i, select) { |
|
|
|
|
var input = $('<input/>'), |
|
|
|
|
gravity = $(select).attr('data-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'); |
|
|
|
|