Skip to content

Instantly share code, notes, and snippets.

@adardesign
Created March 14, 2013 13:31
Show Gist options
  • Save adardesign/5161317 to your computer and use it in GitHub Desktop.
Save adardesign/5161317 to your computer and use it in GitHub Desktop.
$('.tooltip').each(function() {
var thistip = $(this);
var thehash = $(thistip).attr('id');
$('.theoptions').append("<div class='tooltipcontent "+thehash+"' style='display:none'></div>");
$(".tooltipcontent."+thehash).load('tooltips/data.php #'+thehash, function(){
var thehtml = $(".tooltipcontent."+thehash).html().replace(/"/g, '\'');
//alert(thehtml)
$(thistip).attr('title', thehtml).tooltipster('update', thehtml);
$('.tooltip').tooltipster({
//interactive:true
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment