jquery - set target.id to div id and a number? -


the target id below map_external, map_external(and number)

i have this:

$('#jqt').bind('pageanimationstart', function(e, info){            if (e.target.id == 'map_external') {                  if (info.direction =='in') {                     localiser();                 } 

and works, , target page looks this:

<div id="map_external"> content.... </div> 

but have random number aswell, this:

<div id="map_external<%=asp random number%>"> content.... </div> 

so how write if (e.target.id == 'map_external') gets map_external , number(any number)? thanks!

try writing this:

var newid = e.target.id; if (newid.indexof("map_external") > -1) { // test first instance, , find @ 0         if (info.direction =='in') {             localiser();         } } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -