Skip to main content

Bug Tracker

Side navigation

#8432 closed bug (invalid)

Opened March 03, 2011 12:50PM UTC

Closed March 19, 2011 07:49AM UTC

.fadeToggle() breaks DIV style

Reported by: jasemate@internode.on.net Owned by: jasemate@internode.on.net
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:
Description

I have a page with thumbnails. Three thumbnails are above a show/hide DIV that uses .fadeToggle() to show more thumbnails underneath. All thumbnails have functions on hover (switch from transparent to opaque, change main image etc.). When the extra thumbs are hidden, the three above the show/hide DIV work ok. When all thumbs are shown, the thumbs beneath the DIV work OK, but the three original thumbs do nothing.

Here is what happened in the generated source that caused the issue:

Original source was:

<div id="testthis" style="display:none;">

<div style="clear:both"></div>

Source when show/hide clicked was:

<div id="testthis" style="">

<div style="clear:both"></div>

Fixed by changing to:

<div id="testthis" style="clear:both; display:none;">

Now when clicked changes to:

<div id="testthis" style="clear: both; display: block; ">

Question: Why did .fadeToggle() change display:none to "" in the first instance, but change to display:block in the second?

The code used to activate the toggle was this:

<div style="clear:both; text-align:right"><a href="#American_Products" onClick="$('#testthis').fadeToggle('slow','linear');$(this).text($(this).text() == 'More images' ? 'Less images' : 'More images');">More images</a></div>

Attachments (0)
Change History (2)

Changed March 03, 2011 03:53PM UTC by addyosmani comment:1

owner: → jasemate@internode.on.net
status: newpending

Thanks for submitting a ticket to the jQuery Bug Tracker. Could you kindly supply us a reduced test case on jsFiddle.net that reproduced the issue you describe in your ticket?. On first glances this doesn't look like it's a direct problem with jQuery core, but we'll evaluate more thoroughly once we've seen your code.

Changed March 19, 2011 07:49AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!