Last active
September 22, 2016 20:27
-
-
Save TheGP/a569a6c71df17c5923e6 to your computer and use it in GitHub Desktop.
comebacker turn off for iframes (improved function)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* jQuery('.articles iframe').first() должно быть подогнано под сайт. если там всего 1 ифрейм, то достаточно jQuery('iframe') */ | |
| var comebacker_no_more_off = false; | |
| var comebacker_turn_off = setInterval(function(){ | |
| if ('undefined' != typeof(comebacker) && 'undefined' != typeof(comebacker['settings']) && true == comebacker['settings']['launch']) { | |
| jQuery('iframe').on('mouseover', function(){ if (0 == jQuery('#comebacker_main_div iframe:visible').length) comebacker['settings']['launch'] = false; }).on('mouseout', function(){ if (0 == jQuery('#comebacker_main_div iframe:visible').length) comebacker['settings']['launch'] = true; }); | |
| window.clearInterval(comebacker_turn_off); | |
| } | |
| }, 100); | |
| /* | |
| function comebacker_after_cancel() { | |
| comebacker_no_more_off = true; | |
| }*/ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Если нужно чтобы камбекер так и оставался выключенным после наведения на ифрейм, нужно заменить mouseout на mouseout123 например