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


Reply With Quote
Bookmarks