SyntaxFix
Write A Post
Hire A Developer
Questions
I also recently faced the prob. I solved using ^ which is similar to startwith in jquery. Say,
jquery
var str = array[a].id; if (str.startsWith('REP')) {..........}
we can use
if($("[id^=str]").length){..........}
Here, str is id of element.