Thanks very much.
On Apr 20, 2:19 am, Karl Swedberg wrote:
> You could do something like this:
>
> $(document).ready(function() {
> $("#menu ul li a").click(function(e) {
> e.preventDefault();
> var $sibs = $(this).parent().siblings();
> $s
You could do something like this:
$(document).ready(function() {
$("#menu ul li a").click(function(e) {
e.preventDefault();
var $sibs = $(this).parent().siblings();
$sibs.fadeOut(function() {
if ( $sibs.index(this) == $sibs
You could keep a running count of how many li's have called fadeOut
and store it with .data(). Here's an example storing it on the parent
ul:
$("#menu ul li a").click(function(e) {
e.preventDefault();
var li = $(this).parent().siblings();
li.fadeOut(function() {
Thanks for the reply firstly. :) Since I'm talking about a default
jQuery function I didn't give a full example. If you think that I'd
help let me give you one.
I have simplified my code for the example, here it goes:
http://blockedmind.com/jq/fadeout.html
When you click a link, the others are d
Would you mind giving us some code to look at? Or point us to a test
page? It might be easier to help you if we have something to look at.
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Apr 19, 2009, at 7:22 AM, blockedmind wrote:
Hmmm...
On Apr 18, 2:
Hmmm...
On Apr 18, 2:28 am, blockedmind wrote:
> Nothing?
>
> On Apr 17, 8:46 pm, blockedmind wrote:
>
> > This problem occurs when $("#menu li a").fadeOut(function() {}); being
> > used. callback function is called 3 times 'cos there is 3 li elements.
>
> > On Apr 17, 7:28 pm, blockedmind wro
Nothing?
On Apr 17, 8:46 pm, blockedmind wrote:
> This problem occurs when $("#menu li a").fadeOut(function() {}); being
> used. callback function is called 3 times 'cos there is 3 li elements.
>
> On Apr 17, 7:28 pm, blockedmind wrote:
>
> > Callback function of fadeOut effect is executed once
This problem occurs when $("#menu li a").fadeOut(function() {}); being
used. callback function is called 3 times 'cos there is 3 li elements.
On Apr 17, 7:28 pm, blockedmind wrote:
> Callback function of fadeOut effect is executed once for each element
> animated against. Is it possible to make
8 matches
Mail list logo