but if you want get new url by ajax:
$(document).ready(function () {
$('a').on('click', function (e) {
var $this = $(this);
$.ajax({
url: 'GetUrl',
async: false,
success: function (url) {
$this.attr("href", url);
$this.attr("target", "_blank");
},
error: function () {
e.preventDefault();
}
});
})
})
No comments:
Post a Comment