2
&fespecial=lanccontrucao&fespecial=novopronto
Here is a parameter that persists when executing the code below:
// $("#fe1").click(function(){
// $("#fe2").click(function(){
$("#fe3").click(function(){
var url = window.location.href;
var parametro = "fespecial";
var valor = $(this).val();
var master = url+"&"+parametro+"="+valor;
if( $("#fe2").is(":checked") ){
///////////////////////////////////////
// alert("Checked " +master);
window.location.href = master;
} else {
///////////////////////////
// alert("Unchecked " +master);
}
});
I need to clear the current values of the parameter fespecial
to insert a new value in this same parameter that is part of a url. Every time I click on one of these ids it inserts another parameter fespecial
with a new value and I would like to clear what exists to enter the new value of this parameter.
That one
$.param
is almost an equivalent tohttp_build_query
of PHP :)– Wallace Maxters