Created
May 3, 2014 11:47
-
-
Save boyron/c7dac5b04c3f693b4c92 to your computer and use it in GitHub Desktop.
jQuery each break and continue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#tblId tr").each(function(i, obj) { | |
if($(obj).attr('id') =='idBreakHere' ){ | |
return false; //this is equivalent of 'break' for jQuery loop | |
} | |
} | |
$("#tblId tr").each(function(i, obj) { | |
if($(obj).attr('id') =='idToFind' ){ | |
return; //this is equivalent of 'continue' for jQuery loop | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good to know. thank you