D'oh! silly typo. You crack me up, Michael. :-)
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jul 4, 2008, at 3:04 PM, Michael Geary wrote:
For anyone who is wondering, "functino" is Italian for "tiny
function."
Here's another way to write the code,
For anyone who is wondering, "functino" is Italian for "tiny function."
Here's another way to write the code, using only a single event handler
(event delegation) instead of individual event handlers on every link. This
will be faster if there are a lot of product descriptions. I'd also put an
ID
Hi Karl,
Of course, you're right. Javascript should be kept separate from the HTML.
Cheers,
Diego A.
2008/7/4 Karl Swedberg <[EMAIL PROTECTED]>:
>
> Hi Kris,
>
> I'd give the "show description" links a common class -- for example,
> "show-description" That way you can use a basic selector to a
Hi Kris,
I'd give the "show description" links a common class -- for example,
"show-description" That way you can use a basic selector to apply to
all of those links.
Then, I'd use the "this" keyword to find the appropriate description
relative to the clicked link.
Adding "return fals
Hi Kris,
The best way is to not use an ID, or to use a class.
Based on the HTML you posted, you could just use this:
$(this).parent().next().show().end().remove();
... which will show the description and remove the "show description" link
EXAMPLE:
Name: Red Widget
Price: 22.00
Show
d
5 matches
Mail list logo