Skip to content

Instantly share code, notes, and snippets.

@qbmarketing
Created April 25, 2012 15:44
Show Gist options
  • Save qbmarketing/2490769 to your computer and use it in GitHub Desktop.
Save qbmarketing/2490769 to your computer and use it in GitHub Desktop.
JS for qtip
Am i close???
Page in question: http://new.cps.ca/en/grants-bourses/details/resident-advocacy-grant
What I have in the footer:
<script type="text/javascript">
$(document).ready(function() {
$('a.definition').qtip({
content: {
text: function(api) {
return $($(this).attr('id')).html();
}
}
});
$('.tooltip').each(function() {
$(this).qtip({
position: {
my: 'bottom center',
at: 'top center',
target: $(this)
},
style: {
classes: 'ui-tooltip-youtube ui-tooltip-shadow tooltip'
}
});
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment