function(){$(rel).animate({opacity: 'show'}, "slow", "easein");
});
});
Again, sorry for the google english translated :)
- Original Message -----
From: "Joel Birch" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, April 04, 2007 1:36 PM
Subject:
On 05/04/2007, at 1:04 AM, Sebastián V. Würtz wrote:
Now hide the link that should hide the "news", so still donst work :)
I send a pic for example
I set up a quick demo page so I can try and see why your links are
now hiding when you click them. However, my demo page seems to behave
how
Whoops - too many curly brackets in the toggle there. Correct code here:
$(".toggle_cat a").each(function(i){
$(this).attr("title", "Click here to exclude this cat");
$(this).click(function(event){
$(this).toggleClass("selected");
});
var rel = thi
What about this (using your coding style to avoid confusion):
$(".toggle_cat a").each(function(i){
$(this).attr("title", "Click here to exclude this cat");
$(this).click(function(event){
$(this).toggleClass("selected");
});
var rel = this.rel;
#x27; for use in the toggle */
$("." + this.rel).toggle(
function() { $("." + self.rel).hide('slow'); },
function() { $("." + self.rel).show('fast'); }
);
});
});
- Original Message -
From: "Joel Birch" <[EMAIL PRO
slow'); },
function() { $("." + self.rel).show('fast'); }
);
});
});
- Original Message -
From: "Joel Birch" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, April 04, 2007 9:28 AM
Subject: [jQuery] Re: Problem with togle()
...and optimised
...and optimised further to reduce redundant jquery object creation
and property look-ups:
$(".toggle_cat a").each(function(){
$(this)
.attr("title", "Click here to exclude this cat")
.click(function(){
$(this).toggleClass("selected");
v
I guess that inside the anonymous functions within toggle, 'this' is
no longer the 'this' that you intend it to be. Try setting a variable
to the 'this' you want outside of the toggle instead - like so:
$(".toggle_cat a").each(function(i){
$(this).attr("title", "Click here to exclude thi
8 matches
Mail list logo