javascript - jquery.find() unrecognized regex expression -
this question has answer here:
- wildcards in jquery selectors 6 answers
im trying find div name , maximum of 2 digits via jquery.find(); example: "#progresstext1", "#progresstext2", ..."#progresstext12", etc
this code (where closeform form has div elements):
var closediv= closeform.find("#progresstext[/^\d{1,2}$/;]");
and im getting error:
uncaught error: syntax error, unrecognized expression: #progresstext[/^d{1,2}$/;]
can me make work?
use jquery selector "starts with"
// assumes closeform jquery object formed. var closediv = closeform.find('div[id^="progresstext"]');
Comments
Post a Comment