You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking on a tool that would make people's life easier by making a recursive search of elements and give us the deepest level when plainly used.
It should return level count when no index is given;
$("#test").level(); // Which should return 4
also this should select dom at given level index such as;
$(document).ready(function() {
var obj = $("#test").level(2);
alert(obj); // Which should return obj
alert(obj.attr('class')); // Which should return "third"
});
and when there are more than 1 element at that level should return obj array;
Level 0
<div id="test">
Level 1
<div>
Level 2
<div class="third">
Level 3
<div>
Level 4
</div>
</div>
<div></div>
<a></a>
<img />
<span> </span>
</div>
</div>
$(document).ready(function() {
var obj = $("#test").level(2);
alert(obj); // Which should return obj array
alert(obj.length); // Which should return 4 (starting by zero)
});
this would help a lot and solve many turnarounds done with parent(), children(), find() etc..
If its posible to add this feature please contact me (berkeryuceer@yahoo.com).
The text was updated successfully, but these errors were encountered:
I was thinking on a tool that would make people's life easier by making a recursive search of elements and give us the deepest level when plainly used.
It should return level count when no index is given;
also this should select dom at given level index such as;
and when there are more than 1 element at that level should return obj array;
this would help a lot and solve many turnarounds done with parent(), children(), find() etc..
If its posible to add this feature please contact me (berkeryuceer@yahoo.com).
The text was updated successfully, but these errors were encountered: