Saturday, 19 July 2014

Modify href adding a final text on click

jQuery update a href text on click
$("a").click(function() {
var theHref = $(this).attr("href");
$(this).attr("href", theHref + "?isBool=true");
});
Or
$("a").click(function() {
changeMe(this);
});
changeMe = function (obj) {
var theHref = obj.href;
obj.href=theHref + "?isBool=true";
}