Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 03-21-2013, 08:18 PM
virtualgeorge virtualgeorge is offline
Contributing Member
 
Join Date: 09-30-11
Posts: 52
iTrader: 0 / 0%
Adding jquery tooltips to wordpress

I was screwing around with jquery tooltips and created this simple sample page:
Mouse over the address or the map photo to see tooltip.
http://virtualgeorge.info/test4/test.html

So now I want to use that on a wordpress site. If you view the source I figured I would need to add this to the header.php:
Code:
<script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
However, looking at my wordpress page source maybe it should be like this instead?
Code:
<script type='text/javascript' src='http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js'></script>

Add the css on that page to my style.css

Then add the javascript above the </body> tag in the the footer.php
Code:
<script> $(document).ready(function() { $("#download_now").tooltip({ effect: 'slide'}); }); </script> <script> $(document).ready(function() { $("#download_now2").tooltip({ effect: 'slide'}); }); </script>
So then should I be able to use the same html to one of my pages or put it in the footer

Code:
<p align="center"> <!-- trigger element. a regular workable link --> <a href="#" id="download_now">23650 N. 35th Dr. #100<br /> Glendale, AZ 85310</a></p> <!-- tooltip element --> <div class="tooltip"><a href="http://goo.gl/maps/R2X6D" target="_blank"><div class="tttext">Click to View Map or Get Directions</div></a><a href="http://goo.gl/maps/R2X6D" target="_blank"><img src="clear.png" style="margin-top:-20px; position:absolute; right:0;" width="120" height="120" /></a> </div>
But my tooltips didn't pop up so could it be the order that the jquery is called in the header or maybe my css needs to be altered if it ends up being inside of other containers in my wordpress site instead of that simple page?

I can put up a sample page if needed?

thx

Last edited by snakeair; 03-21-2013 at 09:47 PM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 03-21-2013, 08:47 PM
lordspace's Avatar
lordspace lordspace is offline
Contributing Member
 
Join Date: 05-30-06
Location: Canada
Posts: 913
iTrader: 0 / 0%
With WordPress you should use jQuery instead of $
See the console in firebug (F-12) in firefox
 
Reply With Quote
  #3  
Old 03-21-2013, 10:23 PM
virtualgeorge virtualgeorge is offline
Contributing Member
 
Join Date: 09-30-11
Posts: 52
iTrader: 0 / 0%
Quote:
Originally Posted by lordspace View Post
With WordPress you should use jQuery instead of $
See the console in firebug (F-12) in firefox
Sorry but could you elaborate on that just a little?
I am not exactly sure what you mean? If I try it in wordpress will firebug show what the error is & how to correct it?

thx!
 
Reply With Quote
  #4  
Old 03-22-2013, 04:45 PM
lordspace's Avatar
lordspace lordspace is offline
Contributing Member
 
Join Date: 05-30-06
Location: Canada
Posts: 913
iTrader: 0 / 0%
see this:
http://www.ericmmartin.com/5-tips-fo...ith-wordpress/

and this
http://www.ericmmartin.com/5-tips-fo...ith-wordpress/

make sure you use jQuery because WordPress uses $ for another library.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a jquery multipart form on wordpress snitcher Coding Forum 0 05-21-2012 01:29 AM
JQuery slider wouldn't display image in Wordpress hiredpen Coding Forum 3 03-23-2012 01:57 PM
[HELP] Wordpress / Jquery I think it might be simple. webjax Coding Forum 0 09-20-2011 05:49 PM
wordpress jquery problem osec Coding Forum 1 12-06-2009 10:54 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:24 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC