Check if value exists in array jquery
Source code
<script>
var arr = ["value", 4, "Pete", 8, "John" ];
var index = jQuery.inArray( "value", arr );
alert(index);
</script>
More code answers
Comments
Log in to leave a comment.
<script>
var arr = ["value", 4, "Pete", 8, "John" ];
var index = jQuery.inArray( "value", arr );
alert(index);
</script>
Log in to leave a comment.
We use necessary cookies to keep you signed in and remember your cart and currency. With your OK we also use cookies to see how the site is used, to measure our ads and affiliate links, and for live chat. Cookie details