remove class on thumbnail click

patrick's Avatar

patrick

08 Jan, 2019 04:03 PM

dear dimitry

i managed, by toggling a css class, to hide overflow and show thumbnails (which are hidden otherwise).
but then i should reverse the toggle when clicking on a thumbnail, to get overflow back and hide thumbnails again.

this is what i am trying to achive:

http://www.solvesundsbo.com/work/voguechinacolouroverload

i have now spent almost two days trying to figure it out. but just dont succeed. any help would be mostly appreciated.

best patrick

  1. Support Staff 1 Posted by Dmitry Semenov on 08 Jan, 2019 04:28 PM

    Dmitry Semenov's Avatar

    Hello,

    I'd need some more details on what exactly you can't figure out, link to the page that you're working on would be great.

    The site on the page that you linked only toggles one class, that toggles visibility:hidden on rsOverflow and rsNav.

    Also, make sure that you have thumbs.fitInViewport option set to false.

  2. 2 Posted by patrick on 08 Jan, 2019 04:52 PM

    patrick's Avatar

    wow, that was fast. thank you. and sorry for not providing a link, but i yet have everything just local on my computer...

    i managed to change visibility (onclick) to hide the slideshow and show the thumbnails. but then clicking the thumbnails should reverse the toggle. to make the slideshow again visible and hide the thumbnails...

  3. Support Staff 3 Posted by Dmitry Semenov on 09 Jan, 2019 06:44 AM

    Dmitry Semenov's Avatar

    i managed to change visibility (onclick) to hide the slideshow and show the thumbnails. but then clicking the thumbnails should reverse the toggle. to make the slideshow again visible and hide the thumbnails

    Bind click event to thumbnails and remove the class that you added previously, or toggle the visibility of elements manually.

  4. 4 Posted by patrick on 09 Jan, 2019 07:22 AM

    patrick's Avatar

    thank you dimitry.

    but how and where do i do that? i am pretty new to javascript and its killing me...

  5. Support Staff 5 Posted by Dmitry Semenov on 09 Jan, 2019 03:03 PM

    Dmitry Semenov's Avatar

    Can't assist much with custom code, here is basic example:

    $('.royalSlider').on('click', '.rsNavItem', function() {
      $('.rsOverflow').css('visibility', 'hidden');
      $('.rsNav').css('visibility', 'visible');
    });
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac