The script below has a parameter called loadurl. The loadurl represents a page that is retrieved with an ajax call to the database. I want to dynamically supply a url to the $.get() function with an onclick command in a div
$(".get").click(function ()
{
$.get(loadUrl,
function (responseText){
$("#result").html(responseText);
});
}
);
Html code that i want to supply the new url to $.get() function
<div onclick="$.get()" class="get"> page 1</div>
<div onclick="$.get()" class="get"> page 2</div>
Thanks
why don’t you use an a tag and use the href attribute?
Here would be some html.