hasher22 Posted June 19, 2021 Share Posted June 19, 2021 (edited) Site URL: https://www.onyxlab.com.au Edit: Please see next post Edited June 19, 2021 by hasher22 creedon 1 Link to comment
hasher22 Posted June 19, 2021 Author Share Posted June 19, 2021 (edited) EDIT: Fixed! Idiot me had "</div>" all over the middle section, deleted those and site working fine! Hello, I added a simple code block with no CSS and no JS and it's making my site bug up. For example, text spacing and height changes, button padding changes automatically. But when I remove the code block, everything goes back to normal. My code block below. There are different IDs because I need them when I generate my JS for selected postcodes that are valid or not <div class="postcode-checker"> <div> <p>Enter your NSW postcode to check if we deliver in your area: <input type="text" id="postcode" placeholder="Postcode..."></p> <p id="wedeliver" style="display:none;" > <strong>Yes, we deliver in your area!</strong> </p> <p id="wedeliver1" style="display:none;" > <strong>Yes, we deliver in your area!</strong> </p> <p id="wedeliver2" style="display:none;" > <strong>Yes, we deliver in your area!</strong> </p> <p id="nodeliver" style="display:none;" > <strong>Sorry, we currently do not deliver to your area.</strong> </p> </div> <p id="nodeliver1" style="display:none;" > <strong>Sorry, we currently do not deliver to your area.</strong> </p> </div> <p id="nodeliver2" style="display:none;" > <strong>Sorry, we currently do not deliver to your area.</strong> </p> </div> <p id="nodeliver3" style="display:none;" > <strong>Sorry, we currently do not deliver to your area.</strong> </p> </div> <p id="errormsg" style="display:none;" > Please enter a valid NSW postcode </p> <p id="errormsg1" style="display:none;" > Please enter a valid NSW postcode </p> </div> 217617234_Jre1.8.0_1812021_06.19-23_31_05_16.mp4 Edited June 19, 2021 by hasher22 Link to comment
paul2009 Posted June 19, 2021 Share Posted June 19, 2021 (edited) 12 hours ago, hasher22 said: I want to implement this on my website (postcode checker on codepen). How do I add more post codes in JS without adding new a new $ line for each post code? I guess you want to show customers if you deliver to their NSW postcode? To how many postcodes do you deliver? Edited June 19, 2021 by paul2009 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
hasher22 Posted June 20, 2021 Author Share Posted June 20, 2021 12 hours ago, paul2009 said: I guess you want to show customers if you deliver to their NSW postcode? To how many postcodes do you deliver? Hey, Thanks for the message, I implemented the way I wanted it on my website. Just found out the restricted areas here are only for USA and Canada. Had to find a work around Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment