set target.id to div id and a number?
Posted
by
Claes Gustavsson
on Stack Overflow
See other posts from Stack Overflow
or by Claes Gustavsson
Published on 2011-02-09T07:12:32Z
Indexed on
2011/02/09
7:25 UTC
Read the original article
Hit count: 214
jQuery
The target id below is map_external, but I would like to get map_external(and a number)
I have this:
$('#jqt').bind('pageAnimationStart', function(e, info){
if (e.target.id == 'map_external') {
if (info.direction =='in') {
localiser();
}
and it works, and my target page looks like this:
<div id="map_external">
content....
</div>
but I would like to have a random number aswell, like this:
<div id="map_external<%=asp random number%>">
content....
</div>
so how do i write if (e.target.id == 'map_external') so that it gets map_external and a number(any number)? Thanks!
© Stack Overflow or respective owner