Jquery check array perform function
- by mtwallet
Hello. I am creating a site that requires a very small postcode checker. I have approx 8 postcode prefix's, HX, HD, BD, LS etc in an array. I also have a simple input field and submit btn. When the user types in a postcode for example HX5 9DU I want Jquery to check the array, if there is match for the first 2/3 letters I want a div to fade in displaying a message.
How would I do this? Many thanks in advance.