Skip to content

Instantly share code, notes, and snippets.

@fleimisch
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save fleimisch/93147257dc22f8d7e420 to your computer and use it in GitHub Desktop.

Select an option

Save fleimisch/93147257dc22f8d7e420 to your computer and use it in GitHub Desktop.
Find string in value attr
var hVehicleSearchVal = $('.hVehicleSearch').val();
if (hVehicleSearchVal.indexOf("carSearch") != -1) {
// Not in the String
} else {
// In the string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment