Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8432 closed bug (invalid)

.fadeToggle() breaks DIV style

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


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>

Change History (2)

comment:1 Changed 12 years ago by addyosmani

Owner: set to [email protected]
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.

comment:2 Changed 12 years ago by trac-o-bot

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!

Note: See TracTickets for help on using tickets.