javascript - jquery.find() unrecognized regex expression -


this question has answer here:

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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -