Ajax Form Submit examples using jQuery

Ajax forms are the integral part of web technology today. It makes sending HTTP requests very easy, no page reloads and it’s fast, it can send-receive information in a various formats such as HTML, JSON or XML. Let’s learn various ways to send HTML form data using jQuery Ajax.

Get current location of user using jQuery

Geolocation API is an important feature available in modern HTML5 web browsers, which allows us to request current location of the user using JavaScript, the location information is represented by latitude and longitude coordinates. For privacy reasons, the user permission is required to access its location information.

Useful jQuery Snippets

If you are looking for useful jQuery snippets, here’s list compiled from my previous posts. I am sure this list will come in handy for you in your jQuery projects. Add/Remove Input Fields Dynamically with jQueryjQuery Move Div Left/right/up/downHow to Select / Deselect All Checkboxes using jQuerySimple Form validation jQuery snippetValidating File Size Before Form Submit (HTML5)Get Selected Values From Radio Button using jQuerSelect Box Change Dependent Options dynamicallyPassword Strength Checker jQueryRestrict multiple URLs in Input with jQueryMove Content Back And Forth With jQueryCreating Simple Hover Fade jQuery PluginTriggering callback after user stops typing jQueryBack to Top Smooth scroll using jQueryDraggable Element with JQuery (No jQuery UI)Enable/Disable Form Submit Button with jQueryGet Selected Values From Radio Button using jQueryConfirmation dialog on leaving pageSelect All Text In Element on ClickGet current location of user using jQuery (Geolocation API)

Check if checkbox input is checked using jQuery

We used .attr() method to get the attribute value of a checkbox. Which would return “checked” if the checkbox state is checked. But as of jQuery 1.6 it will return undefined if checkbox state is not set.