View Single Post
  #7  
Old 01-21-2021, 05:02 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 3,962
 

Default Re: Message on checkout when country selected

Your GB Message put somewhere...
Code:
<div id="GB_Message" style="display:none"> Message for GB customers... </div>
CSS...
Code:
#GB_Message { color: red; font-size: 20px; }
Script...
Code:
<script> $(document).ready(function() { var $selectedCountry = $('select#b_country').val(); if ($selectedCountry == 'GB') { $('#GB_Message').removeAttr('style');// Show message } else { $('#GB_Message').css('display', 'none');// Hide message } $('select#b_country').on('change', function() { var $modifiedCountry = $(this).val(); if ($modifiedCountry == 'GB') { $('#GB_Message').removeAttr('style');// Show message } else { $('#GB_Message').css('display', 'none');// Hide message } }); }); </script>
Untested, but should probably work...
__________________
XCARTMODS.CO.UK | reBOOT reDUX Template | reBOOT reDUX Changelog | ViViD Template (work in progress)
Reply With Quote