Need help with making a dynamic slider hide slides not set in CMS

https://preview.webflow.com/preview/lvh-6e4621?utm_medium=preview_link&utm_source=designer&utm_content=lvh-6e4621&preview=0a7bf1d2a9979ce75f8f8f40f98664dc&pageId=5d1b4d64aee43c1a9b40c04d&itemId=5d3ee808dbd4a6af9096e9f5&mode=preview

Just get rid of this custom code on your Artist’s template page.

<script>
  function init() {
      window.scrollTo(0, 1);
      window.scrollTo(0, -1);
  }
  init()
</script> 

It works for me in inspect once removed. Let me know when published.

I’ve removed the code, but doesn’t seem to have made any difference on the published site… the ghost slide is still there

Thanks for helping me out with this by the way, literally run out of things to try.

I reviewed the Yayoi Kusama CMS entry. 9 entries on the item, 9 shown on the published site. SO I don’t see your issue.

I will tell you this; having 2+MB files for backrounds on slides can create serious issues for browser performance. Especially mobile devices.

1 Like

Hey @webdev yes aware of image sizes, they are going to be re sized, but all being done on the clients end.

Heres a video to show the issue, can you see at the end of the slideshow once the the 09 images have been seen there is an additional “ghost slide” at the end. Thats what i trying to remove.

@otis_hobbs. couple questions, which you may have already covered:

Are you placing the remove command on the specific page (before Body) that contains the slider? Make sure you are doing that.

Have you set the correct visibility condition? If you have not set it specifically to invisible, then the code will not do anything. Let me know. I will try to check back in regularly today to help.

Thanks, here is how i’ve set up the visibility on the slides / Code in situ.

@otis_hobbs Okay - here is what MIGHT be happening. You will have to test this. Your conditional visibility is set on the slide - which is correct. BUT your image is set as a background to a nested div, and is thus being read as a style, not as a div of it’s own. Not sure, but I think what is happening is that because the image is itself a style, it is not being assigned a conditional visibility class by the Webflow JS (styles of classes cannot themselves be given styles).

Instead of making your images backgrounds of a div, replace the nested div within the slide with an image div, and put your cms into the image. You will notice that the header above the cms image input says “Image” rather than “dynamic styles”.

This is all just a guess. Let me know if it works.

-M

Okay, sounds promising, really appreciate everyone helping me out on this so thank you.

I will give it try and let you know.

O

Hi,

I understand your requirement and will be glad to assist you as i have done similar work before.

please connect me over Skype cis.am3 or email me at frank1 AT talentsfromindia dot com

Regards
Frank

@otis_hobbs Did you manage to see why the implementation wasn’t working for you?

I’m having the same problem, and therefore have tried what you have suggested.

The strange thing is, if I view it live in a browser it doesn’t work, and therefore shows the ghost slide, however if I resize the browser, by making it larger or smaller it works, removing the ghost slide. However in the new resized browser, if I then refresh the website, it doesn’t work and shows the ghost slide.
Any ideas?

3 Likes

This is excellent! Thank you

1 Like

i do have the same issue do you already have found a solution for this?

I ended up using a different slider script and embedded it into WF.

1 Like

Thanks for you response, can you share your solution? Thanks!

How do I setup the collection in the slider?

Fantastic! It works like a charm. Thank you so much for sharing this!

Edit: I was wrong. It doesn’t work :frowning:

@studiopowell Any chance you can help on this?
@Paintedblue Would you mind sharing your solution?

Thanks in advance

I believe the solution to this is old. Is there an updated solution for this? I also don’t think you can set conditional visibility on slides anymore.

absolutely amazing!!
Thank you