Bug Tracker

Modify

Ticket #8432 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

.fadeToggle() breaks DIV style

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

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>

Change History

comment:1 Changed 2 years ago by addyosmani

  • Owner set to jasemate@…
  • Status changed from new to pending

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 2 years ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

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!

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.