Created
August 29, 2013 14:07
-
-
Save kylebuch8/6378528 to your computer and use it in GitHub Desktop.
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
/* | |
* ======================================================================== | |
* Initialize the Popovers!!! | |
* ======================================================================== | |
* | |
* there is an issue with IE7 and IE8 creating popovers | |
* in the way that i want to create them. lucky for us, | |
* there is a fix. make sure that we only apply the fix | |
* for IE7 and IE8 | |
* | |
* https://github.com/twbs/bootstrap/issues/7193 | |
*/ | |
if (!$('html').hasClass('lt-ie9')) { | |
$('body').popover({ | |
selector: 'a[data-toggle=popover]', | |
trigger: Modernizr.touch ? 'click' : 'hover' | |
}); | |
} else { | |
$('.lt-ie9 body').on('mouseenter', 'a[data-toggle=popover]', function() { | |
$(this).popover({ | |
container: 'body', | |
trigger: 'manual' | |
}).popover('show'); | |
}); | |
$('.lt-ie9 body').on('mouseleave', 'a[data-toggle=popover]', function() { | |
$(this).popover('hide'); | |
}); | |
} | |
$('body').on('click', 'a[data-toggle=popover]', function(event) { | |
event.preventDefault(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment