Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
problem with toggle(), :hidden and :visible in 1.3.2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jakub Suder  
View profile  
 More options Mar 31, 8:42 am
From: Jakub Suder <jakub.su...@gmail.com>
Date: Tue, 31 Mar 2009 05:42:42 -0700 (PDT)
Local: Tues, Mar 31 2009 8:42 am
Subject: problem with toggle(), :hidden and :visible in 1.3.2
Hi,

In my project, I have a box whose contents are partially hidden, and
the bottom part should be displayed and hidden when you click show/
hide buttons. I've used $(...).toggle() for that, and I've noticed
that it only works the first time (i.e. when the contents are hidden).
show() and hide() work as expected, but toggle() always works like show
(). Also, is(":hidden") always returns true and is(":visible") always
returns false.

This is probably related to the change to hidden and visible matchers
done in 1.3.2, because the same html works perfectly well with 1.3.1.
I've also tried the latest trunk version (rev. 6302) and it has the
same problem as 1.3.2. It's reproducible in Firefox 3 and Safari 4.

Demo for 1.3.1: http://dl.getdropbox.com/u/41808/testjquery131.html
Demo for 1.3.2: http://dl.getdropbox.com/u/41808/testjquery132.html
Pastie (1.3.2): http://pastie.org/432440

Regards,
Jakub Suder


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Mar 31, 9:40 am
From: John Resig <jere...@gmail.com>
Date: Tue, 31 Mar 2009 09:40:42 -0400
Local: Tues, Mar 31 2009 9:40 am
Subject: Re: [jquery-dev] problem with toggle(), :hidden and :visible in 1.3.2
We've made some changes to the logic in the nightlies - does the
change help your case?
http://code.jquery.com/nightlies/jquery-2009-03-26.js

--John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jakub Suder  
View profile  
 More options Mar 31, 10:28 am
From: Jakub Suder <jakub.su...@gmail.com>
Date: Tue, 31 Mar 2009 07:28:42 -0700 (PDT)
Local: Tues, Mar 31 2009 10:28 am
Subject: Re: problem with toggle(), :hidden and :visible in 1.3.2
On 31 Mar, 15:40, John Resig <jere...@gmail.com> wrote:

> We've made some changes to the logic in the nightlies - does the
> change help your case?http://code.jquery.com/nightlies/jquery-2009-03-26.js

No, it doesn't. I'm not sure why but the offsetWidth and offsetHeight
values for the #more element are always 0, even after you call show()
on it and it shows up.

JS


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Mar 31, 10:51 am
From: John Resig <jere...@gmail.com>
Date: Tue, 31 Mar 2009 10:51:00 -0400
Subject: Re: [jquery-dev] Re: problem with toggle(), :hidden and :visible in 1.3.2
Well, if #more doesn't have a height or width (for example, only
contains floated elements and no actual content) then it won't matter.
One solution is to make sure that the element has an overflow: auto;

Regardless, I'll make a note of this and see if there's anything that
we can't do for 1.3.3.

--John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google