jhills7090
Member-
Posts
19 -
Joined
-
Last visited
jhills7090's Achievements
-
Ah I see, thank you.
-
I am an administrator, how do I Opt in?
-
OK thank you 🙂
-
jhills7090 reacted to a post in a topic: DD/MM/YYYY
-
Hi, Wish to change MM/DD/YYYY with DD/MM/YYYY Please can you help? https://www.tourjet.co. uk/request-a-call-back
-
Is it possible I can remove this scroll bar on the left on my Modal (second screenshot)? Bit stuck on this.
-
Beyondspace reacted to a post in a topic: Looking for Help with Button (Javascript)
-
Beyondspace reacted to a post in a topic: Looking for Help with Button (Javascript)
-
Ignore please - sorry Solved:- function replaceLearnMore() { const textElements = document.querySelectorAll('p, span'); textElements.forEach(element => { const text = element.textContent.trim().toLowerCase(); if (text === '_learn_more_') { const wrapper = element.closest('.sqs-block-content'); if (wrapper) { const productTitleElement = wrapper.querySelector('.product-title'); if (productTitleElement) { const link = productTitleElement.querySelector('a'); let href; if (link) { href = link.href; } else { href = productTitleElement.getAttribute('href'); } if (href) { // Create an anchor element instead of a button to use the href const anchor = document.createElement('a'); anchor.textContent = 'Learn More'; anchor.href = href; // Set the hyperlink anchor.style.display = 'inline-block'; anchor.style.backgroundColor = '#0a4f65'; anchor.style.color = '#fff'; anchor.style.padding = '10px 20px'; anchor.style.border = 'none'; anchor.style.borderRadius = '5px'; anchor.style.cursor = 'pointer'; anchor.style.textDecoration = 'none'; element.parentNode.replaceChild(anchor, element); } } } } }); } window.addEventListener('load', replaceLearnMore);
- 1 reply
-
- javascript
- product
-
(and 1 more)
Tagged with:
-
jhills7090 started following Looking for Help with Button (Javascript)
-
Hi, link: https://www.tourjet.co.uk/packages I have scripted in a "Learn More" button with Java - I want the buttons to have the same hyperlink as the images above them which will directly link to the product (the same as the image does). Here is my code. Could anybody help with this? <script> function replaceLearnMore() { const textElements = document.querySelectorAll('p, span'); // Adjust selectors as needed textElements.forEach(element => { const text = element.textContent.trim().toLowerCase(); if (text === '_learn_more_') { const wrapper = element.closest('.sqs-block-content'); if (wrapper) { const button = document.createElement('button'); button.textContent = 'Learn More'; button.style.backgroundColor = '#0a4f65'; button.style.color = '#fff'; button.style.padding = '10px 20px'; button.style.border = 'none'; button.style.borderRadius = '5px'; button.style.cursor = 'pointer'; // Get the href from the first link within the wrapper const link = wrapper.querySelector('a'); if (link) { button.href = link.href; } element.parentNode.replaceChild(button, element); } } }); } window.addEventListener('load', replaceLearnMore); </script>
- 1 reply
-
- javascript
- product
-
(and 1 more)
Tagged with:
-
Hi, I was wondering how I can change the text to white on hover, I have applied the hover color but it doesnt seem to work? /Newsletter button colour #block-yui_3_17_2_1_1722894288272_55797 .newsletter-form-button { color: #a38a5b !important; border-radius: 50px !important; transition: all ease-in-out 700ms !important; -webkit-transition: all ease-in-out 700ms !important; -moz-transition: all ease-in-out 700ms !important; background-size: 100% 200%; background-color: transparent !important; background-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%, #719bb3 50%) !important; } .newsletter-form-button:hover { color: #ffffff !important; background-position: 0 100% !important; }
-
tuanphan reacted to a post in a topic: Event Calendar
-
Hi @tuanphan , It's solved now - I just moved the elements below to the back. Many Thanks,
-
Hi @tuanphan , I was just wondering if you had any update on this please? Thank you for your help so far.
-
Just another quick question please, this works for the September 2024 - but if you look at May and June 2025 - it has the original affect - is there a way to fix it for the entire calendar?
-
Brilliant, Thank you - that's perfect 🙂
-
Hi sorry for some context. I want to make sure this text doesn't overlap. Without having to increase the section length. Many Thanks.
-
Hi, I have an event calendar which is going over the website header when pressed on mobile, I am happy with the look on desktop view but would there be a way to make this more stylish and easier to read for mobile users with CSS? Website - http://www.tourjet.co.uk
-
creedon reacted to a post in a topic: Image moving down
-
That seems to have done the job, thank you 🙂