use window.SwitchBox instead of duplicating code
This commit is contained in:
parent
11f37b24b4
commit
e7183e91d9
1 changed files with 1 additions and 13 deletions
|
@ -74,19 +74,7 @@ function changeImgSrc(url,typeSave,typeMap)
|
|||
jQuery().ready(function() {
|
||||
jQuery("#downloadSwitchLink").removeAttr("href");
|
||||
|
||||
jQuery("#downloadSwitchLink").click(function() {
|
||||
var elt = jQuery("#downloadSwitchBox");
|
||||
|
||||
elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
|
||||
.css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
|
||||
.toggle();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery("#downloadSwitchBox").on("mouseleave click", function() {
|
||||
jQuery(this).hide();
|
||||
});
|
||||
(window.SwitchBox=window.SwitchBox||[]).push("#downloadSwitchLink", "#downloadSwitchBox");
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue