jQuery Used in Projects 1. Get the length of any class var numItems = $('.video_box').length; //Here we get the length of video_box class 2. Get the value of first class var sourcePath = $(".firstLoadThumb").first().val(); //Here we get the first firstLoadThumb class value 3. Splits the text into array var sourcePath = "lion|dog|cat"; animal = sourcePath.split('|'); console.log(animal[0]); //It is explode the string into array. Here animal[0] return lion. 4. Load the page by jquery location.reload(); 5. Datepicker Open Datepicker on image click Html code: <div class="input-append date" id="dp3"> <input type="text" id="datepicker" /> <span class="add...
Coding Cheatsheets - Learn web development code and tutorials for Software developers which will helps you in project. Get help on JavaScript, PHP, XML, and more.