var dataTable = "<ol>"; $.each(data.response.docs, function (key, value) { dataTable += '<li ><a href="' + value.id + '" önmousedown=javascript:StoreClickedURL(' + userId + ',"' + encodeURI(userInput) + '","' + value.id + '")>' + value.id + '</a></li>'; }); dataTable += "</ol>";
$(document).ready(function(){ someElement = $("#someId"); // assuming some element has id="someId" // generate HTML or not, does not matter someElement.mousedown(function(event){ // so something }); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)