This should do: <script type="text/javascript"> $(function() {
$(".red").click(function() { $(this) .removeClass("red") .addClass("gray") .text("bye"); $(".tooltip").show(); return false; }); }); </script> - Richard On Thu, Dec 4, 2008 at 10:30 AM, ipog <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > I'm JQuery beginner and need help on the following. > > I have a anchor tag with class name "red". I want three things to > trigger on click of anchor link > > 1. change class name from "red" to "gray" > 2. change anchor text from "hello" to "bye" > 3. pop-up tool tip (just display will do) > > here is the html > > <html> > <head> > <title>Untitled Document</title> > <script src="jquery-1.2.6.js" type="text/javascript"></script> > > <style> > .red{background:#ff0000;} > .gray{background:#ccc;} > .tooltip{display:none;} > </style> > </head> > > <body> > <a id="toggle-content" class="red" href="#">hello</a><br /> > <span class="tooltip">tool tip </span> > </body> > </html> > > I gave try with .removeClass & .addClass... however not able to get > the result upon click. I did even gave a try with toggle function. > > appreciate immediate help. Thanks in advance. > > -ipog >