Yes, href="#"... Could it be a problem?!? I put # just in oder to make it a link...
This is what I've got into my <div>: <b>Welcome</b> <i>$_user</i>!!! <br/> <a href='#' id='log_out_link'> Log out </a> On Apr 24, 1:08 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]> wrote: > do you actually have an HREF attribute to your A tag ? Because its omission > kills the click event i think. > > > > On Thu, Apr 24, 2008 at 1:22 PM, ^AndreA^ <[EMAIL PROTECTED]> wrote: > > > I think it's simple but it doesn't work... to me. ;-) > > > I want to fire an event when I click on that <a> link inside a > > <div>... > > > Inside of the <div id="id_div"> there are: > > <b> </b> > > <i> </i> > > <a> </a> > > > So <a> would be the third element but it's the first and unique > > <a>.... > > > I tried something like that: > > $(document).ready(function(){ > > $("#id_div a").click(function(){ etc... > > > but it doesn't work. > > > I tried also: > > $(document).ready(function(){ > > $("#id_div").find("a").click(function(){ etc... > > > and it doesn't work as well... > > > If I do this it works but not the way I want to: > > $(document).ready(function(){ > > $("#id_div").click(function(){ etc... > > > because, of course, it fires the event wherever you click inside of > > the <div>... > > instead I want to fire the event just when you click on the <a> link. > > > any idea? > > > thanks in advance!!! > > -- > Alexandre Plennevaux > LAb[au] > > http://www.lab-au.com