I have a -link element that has href link to page, but I have to use Ajax to load that content from href -url and not redirect user to that page. How can I modify my link to just load content from that link, so I can inject that content to current page?
<a class="bind-jquery-event-here-class" href="http://webpage.com">Link</a>
I made this, but it doesn't work.
$(".bind-jquery-event-here-class").bind("click", function() {
var url = $(this)attr("href").val();
var content = $.load(url);
alert(content);
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…