Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wordpress integration
18th July, 19:51
Post: #1
Wordpress integration
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?
Find all posts by this user
Quote this message in a reply
19th July, 17:20
Post: #2
RE: Wordpress integration
(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?
Find all posts by this user
Quote this message in a reply
21st July, 13:12 (This post was last modified: 21st July 13:23 by mpts.)
Post: #3
RE: Wordpress integration
(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
Find all posts by this user
Quote this message in a reply
22nd July, 16:05
Post: #4
RE: Wordpress integration
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.

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)