芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/js/configurateur.js
$(document).ready(function(){ if($('#cuisine').is(':checked')) { $("#seconde").addClass("afficher"); $("#trois").removeClass("afficher"); } else if ($('#dressing').is(':checked')) { $("#trois").addClass("afficher"); $("#seconde").removeClass("afficher"); } $("#cuisine").click(function(){ $("#seconde").addClass("afficher"); $("#trois").removeClass("afficher"); $("#equipementsdressing").addClass("afficher"); $("#plandetravail").addClass("afficher"); $("#electromenagers").addClass("afficher"); $("#typePiece").html( 'de cuisine sur mesure' ); $('#step_3').removeClass("gotostep_visible"); }); $("#dressing").click(function(){ $("#trois").addClass("afficher"); $("#seconde").removeClass("afficher"); $("#equipementsdressing").addClass("afficher"); $("#plandetravail").removeClass("afficher"); $("#electromenagers").removeClass("afficher"); $("#typePiece").html( 'de dressing sur mesure' ); $('#step_3').addClass("gotostep_visible"); }); $(".choix").click(function(){ id = $(this).attr( "id" ); $(".cote_cuisine").removeClass("cote_active"); $(".cote_dressing").removeClass("cote_active"); $("#cote_" + id ).toggleClass("cote_active"); $("#step_2").addClass("gotostep_visible"); }); var implant = $('input.choix:checked').length; if (implant > 0) { $('#step_2').addClass("gotostep_visible"); } else { $('#step_2').removeClass("gotostep_visible"); } $('.gotostep').click(function(e) { e.preventDefault(); idStep = $(this).attr( "id" ); $("#slider_configurator").removeAttr('class'); $("#slider_configurator").addClass("goto" + idStep + "_visible"); $("html, body").animate({ scrollTop: 0 }, "slow"); }); $('#appareils input').on('change', function () { var len = $('#appareils input:checked').length; if (len > 0) { $('#step_3').addClass("gotostep_visible"); } else if (len === 0) { $('#step_3').removeClass("gotostep_visible"); } }).trigger('change'); $('#appareils input#aucun').on('click', function() { var aucunChecked = $('#appareils input#aucun:checked').length; if(aucunChecked > 0) { $('#appareils input').not(this).prop('checked', false); $('#appareils input#aucun').prop('checked', true); } }); $('#appareils input').on('change', function() { if($(this).val() != 'aucun') { if($('#appareils input#aucun').is(":checked")){ $('#appareils input#aucun').prop('checked', false); } } }); $('#dressingsoptions #miroirs').on('click', function() { var miroirsChecked = $('#dressingsoptions #miroirs input:checked').length; if(miroirsChecked > 0) { $('#info_miroirs').toggleClass('inline'); } }); $('#dressingsoptions #tiroirs').on('click', function() { var tiroirsChecked = $('#dressingsoptions #tiroirs input:checked').length; if(tiroirsChecked > 0) { $('#info_tiroirs').toggleClass('inline'); } }); $('#dressingsoptions #coulissants').on('click', function() { var tiroirsChecked = $('#dressingsoptions #coulissants input:checked').length; if(tiroirsChecked > 0) { $('#info_coulissants').toggleClass('inline'); } }); $('input.choix').on('change', function () { var len_implant = $('input.choix:checked').length; var id_implant = $('input.choix:checked').attr( "id" ); if (len_implant > 0) { $('#step_2').addClass("gotostep_visible"); $(".cote_cuisine").removeClass("cote_active"); $(".cote_dressing").removeClass("cote_active"); $("#cote_" + id_implant ).toggleClass("cote_active"); } else if (len_implant === 0) { $('#step_2').removeClass("gotostep_visible"); } $(".cote input").val(""); }).trigger('change'); $('input[name="type_construction"]').on('change', function () { var len_type_constr = $('input[name="type_construction"]:checked').length; if (len_type_constr > 0) { $('#step_4').addClass("gotostep_visible"); } else if (len === 0) { $('#step_4').removeClass("gotostep_visible"); } }).trigger('change'); }); // budget range value in an input var slider = document.getElementById("myRange"); var output = document.getElementById("demo"); output.value = slider.value; // Display the default slider value // Update the current slider value (each time you drag the slider handle) slider.oninput = function() { output.value = this.value; }