?
Solved

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

Posted on 2012-03-18
1
Medium Priority
?
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 37735116
try

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

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

719 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