Created
April 8, 2022 13:29
-
-
Save dantetesta/e6587eb99c3d11b0c95410ed9fb77b68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.filtro-comprar, .filtro-alugar{ display:none; } | |
</style> | |
<script> | |
jQuery( document ).ready(function() { | |
jQuery('select[name="finalidade"]').on('change', function() { | |
var opcdestino = jQuery(this).val(); | |
if(opcdestino=='6'){ | |
jQuery('.filtro-alugar').show(); | |
jQuery('.filtro-comprar, .filtro-nada').hide(); | |
}else if(opcdestino=='7'){ | |
jQuery('.filtro-comprar').show(); | |
jQuery('.filtro-alugar, .filtro-nada').hide(); | |
} | |
}); | |
}); | |
</script> | |
Esse script é usado para ocultar o botão de redirect search baseado na taxonomia (id) | |
Site usado como exemplo: https://ag3premium.com.br/ | |
Lembre de criar 3 campos de redirect search cada um deles com as devidas classes CSS | |
.filtro-comprar | |
.filtro-alugar | |
.filtro-nada | |
select[name="finalidade"] declare aqui o nome do filtro do tipo select |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment