From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of riddle
Subject: [jQuery] Event attaching fail

I'm working on news excerpts and I want to hide everything to just
title,
then create trigger element and switch between excerpts.

* SNIP *

Problem is with 

$(selector + ' .showNews').click(function() {
        $(selector + ' .showNews').parent().removeClass('thumbHidden');
});

I tried many options, even attaching events outside the $.each using
general
$('span.showNews') selector. Simple click, bind("click"... all fail. 

When I write in Firebug inline
onclick="$(this).parent().removeClass('thumbHidden')" it works, class is
removed and my excerpt is shown. 

What am I doing wrong?

-----

Okay, the code you included did nothing... without seeing the entire
page I'm not certain what you are trying to accomplish, so I'm making my
best guess with the code included below.

Basically, you want to do an accordion, correct?

Go try out Joern's Accordian plugin, I think you'll find it much easier
to use then hand coding it...

http://bassistance.de/jquery-plugins/jquery-plugin-accordion/

If you want to include a better example I would gladly try to help, but
as it stands right now I don't have a clear picture of what you are
attempting.  For example, you want all the Headlines to show, but you
are hiding the div.headers that contains the Headlines (
$(".headers").each(); )?

-ALEX

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to