Created
April 24, 2013 00:14
-
-
Save bensternthal/5448568 to your computer and use it in GitHub Desktop.
share on modal
This file contains 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
// Close modal on clicking close button or background. | |
$document.on('click', '#modal .close', flicks.closeModal); | |
//$document.on('click', '#modal.bg_close', flicks.closeModal); | |
$(function() { | |
/* Share Widget *******/ | |
var $share = $('.share'); | |
var $popup = $share.find('.popup'); | |
// Toggle the popup when the button is clicked. | |
// $share.find('.toggle').click(function(e) { | |
// e.preventDefault(); | |
// $(this).siblings('.popup').fadeIn(200); | |
// }); | |
$('body').on("click",'.share > .toggle', function(e) { | |
e.preventDefault(); | |
$(this).siblings('.popup').fadeIn(200); | |
}); | |
// Hide the popup when the mouse moves away. | |
$share.hover(null, function() { | |
$(this).find('.popup').fadeOut(200); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment