Thursday, 19 September 2013

Executing dynamically generated Jquery code

Executing dynamically generated Jquery code

Can any body please tell me the difference between
$(".level3_td[data-levelid=" + 01 + "]") and
$(".level3_td[data-levelid=01]")
I am dynamically generating $(".level3_td[data-levelid=" + 01 + "]") but
it doesn't seem to find the item that I am trying to find. Then I tried to
paste it in the console and found that it wasn't able to find the DOM
object. After that I tried the 2nd one by hard coding
$(".level3_td[data-levelid=01]") and it worked. Can anybody please tell me
what's the difference between both of these and how may I get the first
one to work?
Thanks

No comments:

Post a Comment