Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13246 closed bug (notabug)

bad working filter

Reported by: punkundead@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:

Description

jQuery('a')
.filter('.colorbox') //empty collection
.colorbox();

create incorrect widget

but

jQuery('a.colorbox') //empty collection
.colorbox();

nothing create

https://github.com/jackmoore/colorbox/issues/303

Change History (3)

comment:1 Changed 7 years ago by dmethvin

Resolution: notabug
Status: newclosed

Can you provide a test case on jsfiddle.net?

comment:3 Changed 7 years ago by dmethvin

I suspect this line in the plugin is causing the problem:

if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit.

The .selector property was never documented or public, and the logic there may be making incorrect assumptions. There are also several uses of undocumented jQuery.support properties that may have changed, it's trying to divine whether the browser is IE or not.

The plugin author will need to revise the plugin for it to work with 1.9.

Note: See TracTickets for help on using tickets.