I\'m trying to compare a string given in an input to a div\'s content using jQuery contain.
contain
Problem is, I want to be able to check if the string is cont
You can use .filter [docs]:
var dInput = this.value.toLowerCase(); $(".dDimension").filter(function() { return $(this).text().toLowerCase().indexOf(dInput) > -1; }).css("display","block");