Is there a simple way to get li:gt(-1)
in jQuery? Or greater than or equal to zero using jQuery's :gt
filter?
When the I use the following code, it is not taking li:gt(-1)
:
$('#Input li:gt(-1)').each(function()
Change your code to start at 0 instead of -1, and do a "greater-than-or-equal-to" selector:
$('.someClass:eq('+i+'), .someClass:gt('+i+')')
Or, with a little less duplication:
$('.someClass').filter(':eq('+i+'), :gt('+i+')')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With