I have created simple code
$.expr[':'].test = function(node,index){
console.log(node,index)
}
and executed them
$('div:test()')
All index was 0 and I don't now why? Should use them or not ? I don't want use additional libraries
I have created simple code
$.expr[':'].test = function(node,index){
console.log(node,index)
}
and executed them
$('div:test()')
All index was 0 and I don't now why? Should use them or not ? I don't want use additional libraries
I think its supposed to be $('div:test'). When I tried it in the browser I got a variety of indices. It seems to work