Using jQuery for Progressive Enhancement - J Query

You want to build a site that allows simple task management with a great user experience using animations and Ajax, but you also want to support users who have JavaScript disabled.


You can build the site to work without all the flashiness and then unobtrusively add the JavaScript functionality:

The input form in this page doesn’t require JavaScript. The user checks off the tasks he has completed and submits the form, and then it would be up to the server to load a new page with the completed tasks removed from the list.
Now, we can progressively enhance the page using jQuery: we bind an event handler to the checkboxes that mimics a standard form submit, by getting the submit URL for the form and generating POST data showing that the checkbox was checked. Then we animate the removal of the task to provide feedback to the user. We also hide the submit button because marking tasks complete has become an instantaneous process.

Although few people browse without JavaScript these days, it’s still a good practice when possible to build your pages so they work fine without JavaScript and then use jQuery and JavaScript to enhance them.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

J Query Topics