I don't know that you can use a filter the way you're trying to (using the colon in #logo:a).
Filters are more like tr:first (matches the first <tr> element), tr:odd (matches odd-numbered table rows.. good for zebra-striping)... See the sections about the various types of filters at http://docs.jquery.com/Selectors. As far as your issue... the 'a' in question is a child of the #logo element, so you'd want $('#logo > a').click(function() { }); http://docs.jquery.com/Selectors/child#parentchild On Fri, Sep 4, 2009 at 10:53 AM, lukas <animod...@gmail.com> wrote: > > Thank you! It somehow does not work. > > Here is what I got: > $("#logo:a").click(function(){ > $.cookie('startCookie', 'default').load(' > http://www.mylink.com'); > }); > > And here is the html: > <div id="logo"><a href="template language defines the link here"></ > a></div> > > Does anybody have an idea? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.