Shankar M

Shankar M

  • NA
  • 3k
  • 3.2m

JQuery Each & If

Mar 28 2017 1:25 AM
Hi Folks
 
Will there be any performance issues with both the code ? Which one would be better ?
Code 1
jQuery.each($("#" + GridID).find("[type='checkbox']"), function (index, item)
{
 
});
 
Code 2:
 
if ($("#" + GridID).find("[type='checkbox']")) { 
 
}
 
Please suggest.
Any help appreciated. 
 
 
 

Answers (1)