craigsworks.com - Support Forum

Full Version: Wordpress integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Craig,

awesome work. I'd really love to use qtips on my website, too. I am running on wordpress and somehow cannot figure out how to get it running. Maybe you can help, or someone else managed to install qtips in Wordpress and can help.

1. Is it possible to insert the script into a single page in wordpress, like this:
JS Code
<div id="apple" class="test"><a href="#" title="The Big Apple">New York</a></div>
 
<script class="test" type="text/javascript"> 
// Create the tooltips only on document load
$(document).ready(function() 
{
   // By suppling no content attribute, the library uses each elements title attribute by default
   $('#apple a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      style: 'cream' // Give it some style
   });
 
   // NOTE: You can even omit all options and simply replace the regular title tooltips like so:
   // $('#content a[href]').qtip();
});
</script>


2. Right now I cannot still figure out whether the problem is that jQuery is not loading, or my qtip code is simply wrong or maybe it is wordpress specific. Does anyone have more experience with wordpress integration and can help with calling jquery?
(18th July 19:51)mpts Wrote: [ -> ]2. Right now I cannot still figure out whether the problem is that jQuery is not loading, or my qtip code is simply wrong or maybe it is wordpress specific. Does anyone have more experience with wordpress integration and can help with calling jquery?

If you use Firebug it will show a list of all the currently loaded javascript files. Does jQuery and qtip show up on that list?
(19th July 17:20)Abrasive Wrote: [ -> ]
(18th July 19:51)mpts Wrote: [ -> ]2. Right now I cannot still figure out whether the problem is that jQuery is not loading, or my qtip code is simply wrong or maybe it is wordpress specific. Does anyone have more experience with wordpress integration and can help with calling jquery?

If you use Firebug it will show a list of all the currently loaded javascript files. Does jQuery and qtip show up on that list?

how exactly can i check that? if i open firebug, go to "network" and then "js" nothing happens Sad is there a way to check that with chrome, too?
well, i cannot figure out whether the javascript is being loaded. maybe you can find it out? i placed it into my footer.php with my other scripts (that are being successfully loaded)

this is the link to my staging site:
http://cl.ly/1iNt
The script is being loaded correctly. You can check thi sunder the Script tag under Firebug and somewhere similar in Chrome (don't use it much for this type of stuff).

Make sure your .qtip() call is below the jquery.qtip.js include and both are under the jQuery.js include.
Reference URL's