d45adcf0b9
git-svn-id: http://piwigo.org/svn/trunk@24612 68402e56-0260-453c-a942-63ccdbb3a9ee
23 lines
No EOL
573 B
JavaScript
23 lines
No EOL
573 B
JavaScript
(function () {
|
|
var sbFunc = function(link, box) {
|
|
jQuery(link).click(function() {
|
|
var elt = jQuery(box);
|
|
elt.css("left", Math.min( jQuery(this).position().left, jQuery(window).width() - elt.outerWidth(true) - 5))
|
|
.css("top", jQuery(this).position().top + jQuery(this).outerHeight(true))
|
|
.toggle();
|
|
return false;
|
|
});
|
|
jQuery(box).on("mouseleave click", function() {
|
|
jQuery(this).hide();
|
|
});
|
|
};
|
|
|
|
if (window.SwitchBox) {
|
|
for (var i=0; i<SwitchBox.length; i+=2)
|
|
sbFunc(SwitchBox[i], SwitchBox[i+1]);
|
|
}
|
|
|
|
SwitchBox = {
|
|
push: sbFunc
|
|
}
|
|
})(); |