in my project i m creating html DOM elements dynamically using JQUERY.
All the data that required for creating are in JSON structure.
eg:
[CODE]
[
{
“node”: “INPUT”,
“id”: “BTN”,
“onclick”: “alert(“hi”)”,
“type”: “button”
}
]
so whatever passing to the function as event name should be add to the element.
I tried to add events to the HTML DOM variable as shown below
[CODE]
jQuery(DOMelem).bind(“onclick”, alert(hi));
DOMelem is the HTML element that created dynamically using jquery. i need to bind the events to this.
but im getting error while executing this.
[CODE]
<TR id=1x1x1x1x1 jQuery171010988482103845665=”1″></TR>
any idea why it happens?