Opened 10 years ago
Closed 10 years ago
#13141 closed bug (invalid)
customizing slectors
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
dear support,
The very simple script below does not give same result !! expected result: only even divs have orange background. obtained result: all divs have orange background. workaround: using jQuery-1.7.1.js solves the issue. test env: Windows 8, IE10 and Chrome.
thanks and best regards,
alain
(function ($) {
$.expr:?.myEven = function(elem,idx,meta,items){
return (idx % 2 === 0);
}
})(jQuery);
$(document).ready(function () { $('div:myEven').css('background-color', 'orange'); });
HTML CODE:
<h1> Custom selector </h1> <div> Div01 </div> <div> Div02 </div> <div> Div03 </div> <div> Div04 </div> <div> Div05 </div> <div> Div06 </div> <div> Div07 </div> <div> Div08 </div> <div> Div09 </div> <div> Div10 </div>
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
Please provide a a test case in jsfiddle.net.
comment:3 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
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!
They changed Sizzle. The new syntax is: