I'm trying to select a DOM element with a specific attribute value. I'd like to avoid an each() loop, but all I've seen in jQuery is the ability to detect the existence of the data attribute, not its value. So, I want to accomplish something like this:
if ($('.item[data-index="' + indexVal + '" ]'){
//if an .item with the data-index value of indexVal exists...
}