Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Addons
  3. Tracing Carousel events

Tracing Carousel events

Scheduled Pinned Locked Moved Addons
6 Posts 2 Posters 153 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    spontans
    wrote on last edited by
    #1

    Hello,
    I want to build a carousel slider, when somebody is on the last slide and willing to proceed "clicking NEXT", he will be referred to a different page instead of to the beginning of the slider.

    Is there any possibility to trace the "CLICKING NEXT" event on the last slide of a carousel?

    Many thanks,
    Sasha

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear @spontans

      This one require's a deeper understanding of JS/ jQuery, and after inspecting a little bit i'm quite sure it's possible,

      I apologise that i cant take you through the whole thing however but am happy to set you off in the right direction, if things prove too difficult you may wish to seek the aid of a developer to achieve this task:

      The Carousel cannot be set to "loop" otherwise this will not work -

      Screen Shot 2020-09-09 at 4.00.31 PM.png

      When the Carousel wrapper reaches it's last slide a class "hide-next-related-ui" gets added that prevents us from going further:

      Screen Shot 2020-09-09 at 4.00.43 PM.png

      but this is good news! as we can take this action and build upon it.

      Using jQuery we can wait for the element to exist:

      https://www.google.com/search?safe=off&sxsrf=ALeKk02pFvtsthx92799l8-jA22Q0qTmqQ%3A1599660104204&ei=SOBYX76GDMuyrgSI75HwBw&q=jquery+wait+for+element+to+exist&oq=jquery+wait+for+&gs_lcp=CgZwc3ktYWIQAxgAMgcIABAUEIcCMgcIABAUEIcCMgIIADICCAAyAggAMgIIADICCAAyAggAMgIIADICCAA6BwgAEEcQsAM6BQgAEJECOggIABAWEAoQHjoGCAAQFhAeOgUIIRCgAVDBmB1Yt64dYIm2HWgEcAB4AIABfIgByQqSAQQwLjEymAEAoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab

      ( google searches are so long... )

      And then once it exists we can add a class:
      https://www.w3schools.com/jquery/html_addclass.asp

      And this could do anything you wish, make an image appear - make a link appear, change the color of something etc etc

      Additionally if the Class "hide-next-related-ui" were to not exist anymore because you moved the carousel back to previous slides then its important that our new content would then also disappear as well.

      https://www.w3schools.com/jquery/html_removeclass.asp#:~:text=The removeClass() method removes,names from the selected elements.

      It's a bit of a tricky one but is possible!

      Apologies once again that i am unable to help you with deeper customisation,

      Best wishes & good luck

      Sincerely
      Richard

      1 Reply Last reply
      0
      • RichardR Offline
        RichardR Offline
        Richard
        Global Moderator
        wrote on last edited by
        #3

        Dear @spontans

        This one require's a deeper understanding of JS/ jQuery, and after inspecting a little bit i'm quite sure it's possible,

        I apologise that i cant take you through the whole thing however but am happy to set you off in the right direction, if things prove too difficult you may wish to seek the aid of a developer to achieve this task:

        The Carousel cannot be set to "loop" otherwise this will not work -

        Screen Shot 2020-09-09 at 4.00.31 PM.png

        When the Carousel wrapper reaches it's last slide a class "hide-next-related-ui" gets added that prevents us from going further:

        Screen Shot 2020-09-09 at 4.00.43 PM.png

        but this is good news! as we can take this action and build upon it.

        Using jQuery we can wait for the element to exist:

        https://www.google.com/search?safe=off&sxsrf=ALeKk02pFvtsthx92799l8-jA22Q0qTmqQ%3A1599660104204&ei=SOBYX76GDMuyrgSI75HwBw&q=jquery+wait+for+element+to+exist&oq=jquery+wait+for+&gs_lcp=CgZwc3ktYWIQAxgAMgcIABAUEIcCMgcIABAUEIcCMgIIADICCAAyAggAMgIIADICCAAyAggAMgIIADICCAA6BwgAEEcQsAM6BQgAEJECOggIABAWEAoQHjoGCAAQFhAeOgUIIRCgAVDBmB1Yt64dYIm2HWgEcAB4AIABfIgByQqSAQQwLjEymAEAoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab

        ( google searches are so long... )

        And then once it exists we can add a class:
        https://www.w3schools.com/jquery/html_addclass.asp

        And this could do anything you wish, make an image appear - make a link appear, change the color of something etc etc

        Additionally if the Class "hide-next-related-ui" were to not exist anymore because you moved the carousel back to previous slides then its important that our new content would then also disappear as well.

        https://www.w3schools.com/jquery/html_removeclass.asp#:~:text=The removeClass() method removes,names from the selected elements.

        It's a bit of a tricky one but is possible!

        Apologies once again that i am unable to help you with deeper customisation,

        Best wishes & good luck

        Sincerely
        Richard

        RichardR 1 Reply Last reply
        0
        • RichardR Richard

          Dear @spontans

          This one require's a deeper understanding of JS/ jQuery, and after inspecting a little bit i'm quite sure it's possible,

          I apologise that i cant take you through the whole thing however but am happy to set you off in the right direction, if things prove too difficult you may wish to seek the aid of a developer to achieve this task:

          The Carousel cannot be set to "loop" otherwise this will not work -

          Screen Shot 2020-09-09 at 4.00.31 PM.png

          When the Carousel wrapper reaches it's last slide a class "hide-next-related-ui" gets added that prevents us from going further:

          Screen Shot 2020-09-09 at 4.00.43 PM.png

          but this is good news! as we can take this action and build upon it.

          Using jQuery we can wait for the element to exist:

          https://www.google.com/search?safe=off&sxsrf=ALeKk02pFvtsthx92799l8-jA22Q0qTmqQ%3A1599660104204&ei=SOBYX76GDMuyrgSI75HwBw&q=jquery+wait+for+element+to+exist&oq=jquery+wait+for+&gs_lcp=CgZwc3ktYWIQAxgAMgcIABAUEIcCMgcIABAUEIcCMgIIADICCAAyAggAMgIIADICCAAyAggAMgIIADICCAA6BwgAEEcQsAM6BQgAEJECOggIABAWEAoQHjoGCAAQFhAeOgUIIRCgAVDBmB1Yt64dYIm2HWgEcAB4AIABfIgByQqSAQQwLjEymAEAoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab

          ( google searches are so long... )

          And then once it exists we can add a class:
          https://www.w3schools.com/jquery/html_addclass.asp

          And this could do anything you wish, make an image appear - make a link appear, change the color of something etc etc

          Additionally if the Class "hide-next-related-ui" were to not exist anymore because you moved the carousel back to previous slides then its important that our new content would then also disappear as well.

          https://www.w3schools.com/jquery/html_removeclass.asp#:~:text=The removeClass() method removes,names from the selected elements.

          It's a bit of a tricky one but is possible!

          Apologies once again that i am unable to help you with deeper customisation,

          Best wishes & good luck

          Sincerely
          Richard

          RichardR Offline
          RichardR Offline
          Richard
          Global Moderator
          wrote on last edited by
          #4

          Dear @spontans

          On inspecting some of your other threads i have come to the conclusion that you can definitely do this, apologies for any assumptions :)

          Best
          Richard

          1 Reply Last reply
          0
          • S Offline
            S Offline
            spontans
            wrote on last edited by
            #5

            @Richard-Keith said in Tracing Carousel events:

            Dear @spontans
            This one require's a deeper understanding of JS/ jQuery, and after inspecting a little bit i'm quite sure it's possible,

            Hi Richard,
            Thanks so much for taking your time and finding a hook for me!
            It seems that I can manage to do it by myself.. will try now.
            Thanks

            1 Reply Last reply
            0
            • RichardR Offline
              RichardR Offline
              Richard
              Global Moderator
              wrote on last edited by Richard
              #6

              Dear @spontans

              Great to hear :)
              Let me know how you go it's an interesting and worthy customisation!

              Good luck and best wishes

              Sincerely
              Richard

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              I also code custom websites or custom Lay features.
              šŸ’æ Email me here: šŸ’æ
              info@laytheme.com

              Before you post:
              1. When using a WordPress Cache plugin, disable it or clear your cache.
              2. Update Lay Theme and all Lay Theme Addons
              3. Disable all Plugins
              4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

              This often solves issues you might run into

              When you post:
              1. Post a link to where the problem is
              2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
              3. If the problem is difficult to explain, post screenshots / link to a video to explain it
              Online Users
              Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
              laytheme.com
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Search