diff --git a/includes/custom-field-ajuts-filter-function-frontend.php b/includes/custom-field-ajuts-filter-function-frontend.php index 8b7e79d..96dafd3 100644 --- a/includes/custom-field-ajuts-filter-function-frontend.php +++ b/includes/custom-field-ajuts-filter-function-frontend.php @@ -79,8 +79,8 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form' ) ): -

Results:

- +

';?> +

enviar

@@ -95,7 +95,8 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form' ) ): (function($) { // change - $('#archive-filters').on('click', 'button', function(){ + //$('#archive-filters').on('click', 'button', function(){ + $('#archive-filters').on('click', 'input', function(){ // vars var url = ''; @@ -139,6 +140,8 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form' ) ): }; }); + // remove last ',' + valueschecked = valueschecked.slice(0, -1); // save last cycled filtered value already calculated field=val01,val02,val03 appendtoURL += eachfiltered +'=' +valueschecked +'&'; @@ -147,8 +150,13 @@ if( ! function_exists( 'ofisuport_ajuts_filters_form' ) ): // update url url += '?' +appendtoURL; + + // show or modify the url + //alert( url ); + //$('#filterlink').text(url); - alert( url ); + // convert a href url to new value + $('#submitfilteredlink').attr('href',url); });