[jQuery] "siblings()" bug?
The siblings() function errors out in firefox with:
Error: f has no properties
/include/js/3rdParty/jquery-160.js
Line: 1626
This is probably simple enough for someone, like John, who familiar
enough with the code to validate or throw out w/o example code. So
here is a possible one line fix w/o any example code (patch attached):
line 870: http://proj.jquery.com/dev/svn/jquery/jquery/jquery.js
- siblings: jQuery.sibling
+ siblings: "jQuery.sibling(a)"
You can tickle the bug by sticking this line of code into the ready
function in a page with a div tag. Text inside the div tag will turn
green when you click it if everything is working:
$("div").click(function(){ $(this).siblings().each(function(){
$(this).css({ color: "green" }); }); });
The bug was introduced in revision 134 when the "axis" concept was
introduced. Or at least when things like parent(), parents(), next(),
prev(), etc. where first grouped together that way. Is the fact that
jQuery.sibling(a,n) has two arguments the thing that is requiring us
to explicitly call out that we are only passing "a"?
Ian
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/