Bug Tracker

Modify

Ticket #4334 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

:visible not workgin on tr in IE 7

Reported by: pete in atlanta Owned by: john
Priority: minor Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: :visible Cc: peter_vansteen@…
Blocking: Blocked by:

Description

we're using a toggle edit function that changes the visibility of a table row. Here's the function:

flipEdit = function(num) {

var readId = "#read"+num;

var editId = "#edit"+num; if ($(readId).is(":visible")) $(readId).fadeOut('fast', function() {$(editId).fadeIn();}) else $(editId).fadeOut('fast', function() {$(readId).fadeIn();})

$("#example .round:visible").each(function(){alert(this.id);})

};

It works great on divs and tr's work in FF but not IE7. What happens is that you can toggle to see the edit but can't toggle back to the read only. Thanks and keep up the great work, -PIA

Change History

comment:1 Changed 4 years ago by dmethvin

Can you put together a complete test case with html and script?

comment:2 Changed 4 years ago by hati

change this to Sizzle.selectors.filters.hidden = function(elem){

return elem.offsetWidth === 0
elem.offsetHeight === 0;

};

Sizzle.selectors.filters.visible = function(elem){

return elem.offsetWidth > 0
elem.offsetHeight > 0;

that Sizzle.selectors.filters.hidden = function(elem){

return "hidden" === elem.type
jQuery.css(elem, "display") === "none"

jQuery.css(elem, "visibility") === "hidden";

};

Sizzle.selectors.filters.visible = function(elem){

return "hidden" !== elem.type &&

jQuery.css(elem, "display") !== "none" && jQuery.css(elem, "visibility") !== "hidden";

};

comment:3 Changed 4 years ago by howardr

This has been fixed and closed in another ticket  http://dev.jquery.com/ticket/4374

This ticket should be closed

comment:4 Changed 4 years ago by kjz44

I have the same problem with :visible and TRs on IE7. I solved it by changing my selector from 'tbody tr:visible' to 'tbody tr:not(:hidden)'. Logically, both selectors should produce the same node set, but do not. I suspect the difference is due to the issue described in ticket #4374. A change was submitted (#6286) which seems to make :visible == :not(:hidden) and it looks to me like the change will make :not(:hidden) suffer from the same problem on TRs. Perhaps the solution is to write a custom filter.

comment:5 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

Dup of #4374

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.