Solved

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

Posted on 2012-03-18
1
185 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:
gurvinder372 earned 500 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript Loan Calculator Error 3 35
How Close unsubmited attempts 10 47
Rotate images for Web Page 11 28
Jquery driving me nuts... 14 29
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 …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

730 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