// CUSTOM SCRIPTS FOR Ride 2 School - THINK SODA, NICK KIND 200220 jQuery(function($){ // BODY ONLOAD $(document).ready(function(){ console.log('Running...2'); // RUN FUNCTIONS BASED ON PAGE let pathname = window.location.pathname; let url_parts = pathname.split("/"); let the_part_we_want = url_parts[url_parts.length-1]; let the_page = the_part_we_want; // FOR REGISTRATION FORM if(the_page=='ride2schoolregform'){ /* $('body').on('click', '#register_are_you_a li.Student', function() { let what_is_clicked = 'Student'; $('select.uiInputSelect option').removeAttr('selected'); $('#r2sRegister select.uiInputSelect option[value='+what_is_clicked+']').attr('selected', true).change(); $('#facelift_header').fadeOut(); $('#r2sRegister').fadeIn(); $('#r2sRegister select.uiInputSelect').val('Student'); }); $('body').on('click', '#register_are_you_a li.Teacher', function() { let what_is_clicked = 'Teacher'; $('select.uiInputSelect option').removeAttr('selected'); $('#r2sRegister select.uiInputSelect option[value='+what_is_clicked+']').attr('selected', true).change(); $('#facelift_header').fadeOut(); $('#r2sRegister').fadeIn(); $('#r2sRegister select.uiInputSelect').val('Teacher'); }); $('body').on('click', '#register_are_you_a li.Council_contact', function() { $('select.uiInputSelect option').removeAttr('selected'); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#r2sRegister select.uiInputSelect>option:eq(4)').attr('selected', true).change(); $('#facelift_header').fadeOut(); $('#r2sRegister').fadeIn(); $('#r2sRegister select.uiInputSelect').val('Council contact'); }); */ setTimeout(function(){ $('#sfdc_postcode_container:first').hide(); }, 1000); } // FOR HOME PAGES if(pathname=='/ride2school/s/'){ $('.mainContentArea.span10').hide(); $('#container-sidebar-left').hide(); $('
').insertBefore('.mainContentArea.span10'); let the_html = '