20 Apr
If we have list of item or array of response and running .each() to parse them. After finishing loop we want to execute some code or any other function then we can use simple loop counter with inbuilt .each() loop. Like I have a array of response
First count length of response
var count = responseData.length; //parse response with each $.each(responseData, function(index, item) { //do normal operation with every each element // do when loop reached at last point if(!--count){ // this code will run at last each step or at the end of each loop } }
I am a software engineer who specializes in Internet applications. I have worked with a wide variety of technologies and programming languages to open source LAMP environments. I have more than 6 years of object-oriented programming experience and am highly proficient in ActionScript, PHP, MYSQL, JavaScript, Jquery and a multitude of other technologies used in modern web applications.
Follow me
Latest posts by Rajeev Achra (see all)
- Jquery webcam plugin - June 19, 2016
- How To Add and Delete Users on a CentOSServer - June 5, 2016
- How To Set Up vsftpd on CentOS 6 - June 5, 2016