AlyshaD Posted August 11, 2023 Share Posted August 11, 2023 Our company website was built by our external team a few years ago and has been working fine but recently the image rollover effect we had in our portfolio is no longer working. I've double checked the CSS code and inserts but can't see anything visibly wrong and it wouldn't make sense for it to randomly stop working! The code injection for this bit is here: //image rollover $('.sqs-block-image p:contains(rollover)').parents('.sqs-block-image').addClass('rollover').prev().addClass('original'); $('.original').mouseover(function(){ var url = $(this).next().find('img').attr('data-src'); $(this).find('img').attr('src', url); }) $('.original').mouseout(function(){ var url = $(this).find('img').attr('data-src'); $(this).find('img').attr('src', url); }) //end of your code } And this is the custom CSS: //image rollover effect .rollover { display: none !important } body:not(.sqs-edit-mode-active) { .rollover { display: block } Would anyone have any idea why this would randomly stop working? Link to comment
tuanphan Posted August 12, 2023 Share Posted August 12, 2023 Hi, Can you share link to page where you use images? We can check problem easier 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!) Link to comment
AlyshaD Posted August 14, 2023 Author Share Posted August 14, 2023 On 8/12/2023 at 10:24 AM, tuanphan said: Hi, Can you share link to page where you use images? We can check problem easier Of course, sorry! It's https://www.sunainteriordesign.com/portfolio Link to comment
tuanphan Posted August 15, 2023 Share Posted August 15, 2023 21 hours ago, AlyshaD said: Of course, sorry! It's https://www.sunainteriordesign.com/portfolio Thank you. What should effect look like? If you describe it, we can check easier 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!) Link to comment
AlyshaD Posted August 15, 2023 Author Share Posted August 15, 2023 2 hours ago, tuanphan said: Thank you. What should effect look like? If you describe it, we can check easier Basically, when you roll over the image, it shows another image as a rollover effect. I've included a snip below. The blue block that says "show homes" is the one that shows up when you rollover the black and white image. To make it work, you need to type "rollover" on the lower image. Link to comment
Solution tuanphan Posted August 19, 2023 Solution Share Posted August 19, 2023 Change src to srcset 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!) Link to comment
AlyshaD Posted August 22, 2023 Author Share Posted August 22, 2023 Thats fixed it perfectly. Thanks so much for your help! tuanphan 1 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