auto complete code snippet like google suggestions
Categories
auto complete code snippet like google suggestions
Nice ajax function to grab the latitude and longitude of an address or postcode. Don’t forget your google key and address formatting.
This is a jQuery custom function used for clearing the default input values of input fields without having to add a class or inline javascript like onclick or onblur. Just write your input and give it a value like you normally would and then add this function and you’re good to go.
CSS: .error style the error class Form HTML: class=”required” makes the input field required minlength=”2″ makes the field require at least 2 characters
The jQuery autocomplete plugin allows developers to implement autocompletion for text input fields. Suppose you have a dictionary application. You might want to autocomplete words for a user to ease searching.
If you don’t know what jQuery is, I’d recommend you to visit jquery.com for clarification. Suppose you have an HTML div element which you want to hide and show. <div id=’foo’>bar</div> The next step is to use a so called selector to select the element and call the hide() function to hide the element. $(‘#foo’).hide(); The [...]