Last active
August 7, 2020 18:12
-
-
Save ericakfranz/319e07075d7ebd1d10315b2bc5e63370 to your computer and use it in GitHub Desktop.
Floating MonsterLink example 1 Javascript
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
// Floating MonsterLink Style 1 | |
jQuery(document).ready(function ($) { | |
//* Animate Floating MonsterLink into view on page load | |
$('.floating-monsterlink.style1').addClass('show'); | |
//* Animate out of view function | |
function closeFloatingMonsterLink(e) { | |
e.preventDefault(); | |
$('.floating-monsterlink.style1').removeClass('show'); | |
} | |
//* Triggers that run closeFloatingMonsterLink function | |
// run closeFloatingMonsterLink when close icon is selected | |
$('.floating-monsterlink.style1 .float-close').click(closeFloatingMonsterLink); | |
// run closeFloatingMonsterLink when manual trigger campaign is successfully loaded | |
$(document).on('om.Campaign.afterShow').click(closeFloatingMonsterLink); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment