-
-
Save objectivehtml/2491327 to your computer and use it in GitHub Desktop.
JS for qtip
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
<a href="#your-tooltip-id" class="definition">Show Tooltip</a> | |
<div class="ui-tooltip" id="your-tooltip-id"> | |
<p>Some content goes here</p> | |
</div> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('a.definition').qtip({ | |
content: { | |
text: function(api) { | |
var id = $(this).attr('href'); | |
return $(id).html(); | |
} | |
}, | |
position: { | |
my: 'bottom center', | |
at: 'top center' | |
}, | |
style: { | |
classes: 'ui-tooltip-youtube ui-tooltip-shadow' | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment