Monday, October 12, 2015

Dynamic bind onclick event argument passing using jQuery


Here onclick action:
onclick="changeevent(\'' +$(this).attr("ows_Title")+'\')"


Binded html tag:

$("#spancat").append('<li style="cursor:pointer" onclick="changeevent(\'' +$(this).attr("ows_Title")+'\')">'+$(this).attr("ows_Title")+'</li>');

No comments:

Post a Comment