jacobtdb Posted March 24, 2020 Posted March 24, 2020 Site URL: https://www.truenorth-designs.dk/webshop/pandora-stol-saedepolstret Can i change - or hide - the the text "Select" in the dropdown ? Any ideas of how to ? If possible at all. Best regards Jacob
tuanphan Posted March 26, 2020 Posted March 26, 2020 Add to Code Injection Footer <script> jQuery(function($){ $("select option").html(function() { return $(this).html().replace("Select", "tuan"); }); }); </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
jacobtdb Posted March 31, 2020 Author Posted March 31, 2020 Thanks, but it seems not work. Any idea why? It is a webshop in 7.0 version
tuanphan Posted March 31, 2020 Posted March 31, 2020 5 hours ago, jacobtdb said: Thanks, but it seems not work. Any idea why? It is a webshop in 7.0 version Can you keep above code & I will check again? and which template do you use? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
jacobtdb Posted April 2, 2020 Author Posted April 2, 2020 I put the code in again. You can check a product here: https://www.racingfordenmark.com/webshop/poloshirt-til-mand
tuanphan Posted April 2, 2020 Posted April 2, 2020 remove above and use this <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function() { $("select option").html(function() { return $(this).html().replace("Select", "tuan"); }); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
paul2009 Posted April 2, 2020 Posted April 2, 2020 I don't want to be the bearer of bad news, but that solution will appear to work when logged on, and when the page is refreshed, but it won't work for visitors who navigate to the page from another page on your site. This is because the document.ready function will not fire when this template loads a new page (see Ajax). For example, this is what I see: Replacing it with the onInitialize function will fix this. Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
jacobtdb Posted April 2, 2020 Author Posted April 2, 2020 Thanks. You are right. I tried this code and it seems like this works. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> window.Squarespace.onInitialize(Y, function(){ $("select option").html(function() { return $(this).html().replace("Select", "Vælg"); }); }); </script>
jacobtdb Posted May 1, 2020 Author Posted May 1, 2020 On 4/2/2020 at 2:31 PM, paul2009 said: I don't want to be the bearer of bad news, but that solution will appear to work when logged on, and when the page is refreshed, but it won't work for visitors who navigate to the page from another page on your site. This is because the document.ready function will not fire when this template loads a new page (see Ajax). For example, this is what I see: Replacing it with the onInitialize function will fix this. Any idea of why this code does´nt work in 7.1 ? Using it here fx: https://www.lindbikeparts.dk/webshop/marconi-collection-1
tuanphan Posted May 2, 2020 Posted May 2, 2020 On 5/1/2020 at 3:10 PM, jacobtdb said: Any idea of why this code does´nt work in 7.1 ? Using it here fx: https://www.lindbikeparts.dk/webshop/marconi-collection-1 Which code did you use? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
jacobtdb Posted May 4, 2020 Author Posted May 4, 2020 On 5/2/2020 at 4:43 PM, tuanphan said: Which code did you use? <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> window.Squarespace.onInitialize(Y, function(){ $("select option").html(function() { return $(this).html().replace("Select", "Vælg"); }); }); </script>
ievavi Posted May 31, 2021 Posted May 31, 2021 On 3/26/2020 at 3:44 PM, tuanphan said: Add to Code Injection Footer <script> jQuery(function($){ $("select option").html(function() { return $(this).html().replace("Select", "tuan"); }); }); </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> @tuanphan Your solution works perfectly, however, on mobile the word SELECT still pops up. Do you have an idea how to solve this issue?
tuanphan Posted June 1, 2021 Posted June 1, 2021 On 5/31/2021 at 4:19 PM, ievavi said: @tuanphan Your solution works perfectly, however, on mobile the word SELECT still pops up. Do you have an idea how to solve this issue? Can you share link to a product? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
ievavi Posted June 1, 2021 Posted June 1, 2021 8 hours ago, tuanphan said: Can you share link to a product? Of course. For example, on mobile (one variant):https://rocksforlife.com/our-jewellery/band-ring-yellow-gold (pass: rocksfor.life)
tuanphan Posted June 3, 2021 Posted June 3, 2021 On 6/2/2021 at 5:49 AM, ievavi said: Of course. For example, on mobile (one variant):https://rocksforlife.com/our-jewellery/band-ring-yellow-gold (pass: rocksfor.life) It looks like you solved? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
ievavi Posted June 3, 2021 Posted June 3, 2021 2 minutes ago, tuanphan said: It looks like you solved? It's strange! Because it does work for some products and for some doesn't. For example, https://rocksforlife.com/our-jewellery/single-pave-ring-yellow-gold still shows as SELECT SIZE on Mobile ...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.