Solved

is there anything I could do to speed up this routine ?

Posted on 2012-03-18
1
177 Views
Last Modified: 2012-06-21
it moves selected checkboxes to an array:
they all are inside a 'tab' div but jquery does not allow me to do $('#tab input.c')
otherwise it would be probably one method to improve performance

	 var start = new Date().getTime();
 	  
	 pchecked[currentPage] = [];
	 $('input.c').each(function() 
	  {	
	 
	   var checksts = this.checked;
		 if (checksts == true) 					 			  			 
	        pchecked[currentPage].push(this.name);   
	  });
	 
	 var end = new Date().getTime();
	 var time = end - start;
	 alert('Execution time: ' + time);

Open in new window

0
Comment
Question by:Rozamunda
1 Comment
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
Comment Utility
try

 $('input.c:checked').each(function()
 {            
              pchecked[currentPage].push(this.name);  
 });

check
http://api.jquery.com/checked-selector/
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now