Clear form fields with exception in jQuery

Using jQuery you can clear form fields. Here I am going to describe, how we can clear all of the fields except a few using jQuery. Example of Clear form fields: <div id=”mainDiv”> <input type=”text” id=”txt1″ /><br/> <input type=”text” id=”txt2″ /><br/> <input type=”text” id=”txt3″ /><br/> <input type=”text” id=”txt4″ /><br/> <button id=”clearall”>Clear All</button> </div> Now, we […]

Skilful act jQuery tips and tricks

jQuery is a JavaScript library which is simple, light-weight, open source, cross browser and simplifies animations, event handling, and developing Ajax-based web applications and promotes rapid application development. Here are few jQuery tips: Check Element Exists if ($(“#element”).length) { … } Check Element Is Visible if($(“#element”).is(“:visible”) == “true”) { … } Disable Right Mouse Click […]