mouseover on link

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

mouseover on link

Post by Anant »

Hi,

I have a page with list of articles (with link) which is populated from a MySQL database - so clicking on thr name(link) take the user to the full article.
This works fine, but I want to include short summary description for each article which 'drops down' only when the user places mouse over the Article name(link) and the summary description row for each article remains hidden until mouseover on link (then dissapears onmouseout).

Do i have to use JQuery and AJAX to accomplish the same. Can any one point me to few examples ?

(Moving to PHP from .NET isn't the bestest thing. I am learning how to write bad code until i start PHP in object oriented style.)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: mouseover on link

Post by requinix »

Are you talking about "tooltips" or something fancier?
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

Re: mouseover on link

Post by Anant »

yeh exactly ... tooltips - do you have any resource which gives a demo code how to implement this in php .. I will try googling as well but am not feeling lucky today.

Thanks
tonchily
Forum Commoner
Posts: 54
Joined: Thu Sep 02, 2010 10:44 am

Re: mouseover on link

Post by tonchily »

User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: mouseover on link

Post by Jonah Bron »

An easier way is to use the title attribute. Then you just get a basic, native tootip.

http://www.w3schools.com/tags/att_standard_title.asp

Con: you can't have newlines.
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

Re: mouseover on link

Post by Anant »

Yap i know that - but that's not what i am looking for..

I couldn't find any step by step example as of now... search is On..

Thanks..
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

Re: mouseover on link

Post by Anant »

tonchilly i tried -
But it's not working - i installed jquery.js and hovertip.js but i can't get it to work when called from webpage..
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: mouseover on link

Post by Jonah Bron »

Did you remember to put <script type="text/javascript" src="jquery.js"></script> in your <head>?
Post Reply