Files
roi-theme/wp-content/plugins/ajax-search-pro/backend/settings/assets/analytics.js
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

31 lines
1.2 KiB
JavaScript
Executable File

jQuery(function($){
$('select[name=analytics]').on('change', function(){
var v = $(this).val();
if ( v == '0' ) {
$('.asp_al_pageview').addClass('hiddend');
$('.asp_al_event').addClass('hiddend');
$('.asp_al_both').addClass('hiddend');
} else if ( v == 'pageview' ) {
$('.asp_al_pageview').removeClass('hiddend');
$('.asp_al_event').addClass('hiddend');
$('.asp_al_both').removeClass('hiddend');
} else if ( v == 'event' ) {
$('.asp_al_pageview').addClass('hiddend');
$('.asp_al_event').removeClass('hiddend');
$('.asp_al_both').removeClass('hiddend');
}
}).trigger('change');
$('.asp_gtag_switch input[isparam]').on('change', function(){
if ( $(this).val() == 1 ) {
$(this).closest('fieldset').find('.asp_gtag_inputs').removeClass('disabled');
} else {
$(this).closest('fieldset').find('.asp_gtag_inputs').addClass('disabled');
}
}).trigger('change');
$('.asp_submit_reset').on('click', function(){
if(confirm('Do you really want to reset the options to defaults?')) {
return true;
}
return false;
});
});