Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] qTip in wordpress - jquery in no conflict mode
22nd August, 12:27
Post: #1
qTip in wordpress - jquery in no conflict mode
Hi Craig,

first af all, thanks for the awesome tooltips!
i have a question about qTips and jquery in no conflict-mode though.

the wordpress docs tell me, i should call scripts like this:
JS Code
<?php
         wp_enqueue_script('newscript',
          'wp-content/themes/test/javascript/jquery.qtip-1.0.0-rc3.min.js',
             array('jquery'),
                '1.3.2' );
      ?>

this works, cause i see that either jquery and qTips are loaded.
but wordpress loads jquery in no conflict mode.
and now i'm clueless as to how i could get qTips on the go.

I initialize qTips as follows
JS Code
<script type="text/javascript">
// Create the tooltips only on document load
jQuery(document).ready(function($) // wordpress 
   {
      $('a[href][title]').qtip({
   content: {
         text: false
      },
   position: {
      corner: {
         target: 'topRight',
         tooltip: 'bottomLeft'
      }
   },
   style: { 
      padding: 5,
      background: '#7ba52d',
      color: 'black',
      textAlign: 'center',
      border: {
         width: 7,
         radius: 5,
         color: '#7ba52d'
      },
      tip: 'bottomLeft',
      name: 'dark' // Inherit the rest of the attributes from the preset dark style
   }
});
});
</script>


do you have any hints for?
THANKS IN ADVANCE!

ulrich
Find all posts by this user
Quote this message in a reply
22nd August, 13:41
Post: #2
[Solved] qTip in wordpress - jquery in no conflict mode
Try out this modified code (it's not tested so don't shoot me if it won't work Wink)

JS Code
<script type="text/javascript">
// Create the tooltips only on document load
jQuery(document).ready(function() // wordpress 
   {
      jQuery('a[href][title]').qtip({
   content: {
         text: false
      },
   position: {
      corner: {
         target: 'topRight',
         tooltip: 'bottomLeft'
      }
   },
   style: { 
      padding: 5,
      background: '#7ba52d',
      color: 'black',
      textAlign: 'center',
      border: {
         width: 7,
         radius: 5,
         color: '#7ba52d'
      },
      tip: 'bottomLeft',
      name: 'dark' // Inherit the rest of the attributes from the preset dark style
   }
});
});
</script>

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
24th August, 16:30
Post: #3
qTip in wordpress - jquery in no conflict mode
Hi Craig,
thanks for the quick reply!

though it doesn't work if i load jquery with 'wp_enqueue_script'.
for now i load jquery the not so preferred way but at least it works...
i'll update here if i find a solution.

ulrich
Find all posts by this user
Quote this message in a reply
1st February, 21:49 (This post was last modified: 1st February 21:52 by ben_allison.)
Post: #4
RE: qTip in wordpress - jquery in no conflict mode
Yeah, this doesn't work for me either.

When I register my own jQuery, it does. But that's no good because there a bunch of dependencies... and, other jQuery scripts I have work when I use the noconflict method.

Any ideas on how I can get qTip running in WP, without having to tear things apart?

(24th August 16:30)ulrich Wrote:  Hi Craig,
thanks for the quick reply!

though it doesn't work if i load jquery with 'wp_enqueue_script'.
for now i load jquery the not so preferred way but at least it works...
i'll update here if i find a solution.

ulrich

Apparently this hacked version works!

http://jdadesign.net/2010/11/qtip-librar...rdpress-3/
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Step by step instructions to integrate qTip2 with wordpress newbie2012 1 120 16th April 17:36
Last Post: Craig
  the plugin do not work correctly with jquery 1.7? vic906 1 148 12th April 22:09
Last Post: Craig
  Qtips with jquery UI Issue sherwoodbear79 2 439 15th February 15:36
Last Post: sherwoodbear79
  [Solved] Need some help:codes in Jquery BabyShung 1 341 29th January 16:35
Last Post: Craig
  Tooltips not loading jQuery or other js files from parent document crodesign 2 477 13th January 22:19
Last Post: crodesign
  qtip with jquery mobile tap event finedesignz 1 647 4th January 21:18
Last Post: Craig
  [Solved] qtip does not work with wordpress version 3.1.4 zakirstage 8 808 2nd December 12:34
Last Post: zakirstage
  qtip inside the jquery UI Dialog tiggi 1 784 20th October 18:49
Last Post: Craig
  Google Calendar like bubble for Jquery FullCalendar tdmohr 13 13,028 18th October 07:22
Last Post: jokepondy
  Cannot make jquery plugin or qtip plugin work anindasen 3 986 8th October 13:49
Last Post: Craig



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