Implementing progressive enhancement with Ajax
Throughout this book, we encountered the concept of progressive enhancement. To reiterate, this philosophy ensures a positive user experience for all users by mandating that a working product be put in place first before additional embellishments are added for users with modern browsers.
As an example, we'll build a form that searches GitHub repositories:
<form id="ajax-form" action="https://github.com/search" method="get"> <fieldset> <div class="text"> <label for="title">Search</label> <input type="text" id="title" name="q"> </div> <div class="actions"> <button type="submit">Request</button> </div> </fieldset> </form>
Note
Getting the example code
You can access the example code from the following GitHub repository: https://github.com/PacktPublishing/Learning-jQuery-3.
The search form is a normal form element with a text...