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. JS event on change of slide in carousel

JS event on change of slide in carousel

Scheduled Pinned Locked Moved Addons
8 Posts 3 Posters 711 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.
  • F Offline
    F Offline
    fbn
    wrote on last edited by
    #1

    Hi,

    is there an event that fires when the slide changes in the carousel addon? I checked the code and noticed Flickity is used, but I had no success trying to access its change event.

    Thanks in advance,
    Florian

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

      Dear @fbn
      it is not really possible to access this.
      Flickity is too integrated in the theme.

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fbn
        wrote on last edited by
        #3

        Hi @mariusjopen,

        thanks for your reply. So that means there is no way to run an action on image change of the carousel? Is there a way to enable Flickity so I can use its events?

        Thanks,
        Florian

        1 Reply Last reply
        0
        • mariusjopenM Offline
          mariusjopenM Offline
          mariusjopen
          Global Moderator
          wrote on last edited by
          #4

          Dear @fbn
          we are working on that regarding another question of a user.
          Just a moment…

          :-)

          Best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fbn
            wrote on last edited by
            #5

            Hi @mariusjopen,

            great to hear that, looking forward to it :)

            Best,
            Florian

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

              :-D Thank you for your patience!

              www.mariusjopen.world

              1 Reply Last reply
              0
              • arminunruhA Online
                arminunruhA Online
                arminunruh
                Global Moderator
                wrote on last edited by
                #7

                Hey!

                Yeah of course you can use flickity's events!

                window.laytheme.on('newpageshown', function(){
                
                jQuery('.lay-carousel.transition-sliding').on('select.flickity', function(event){
                var flkty = Flickity.data( event.target );
                var ix = flkty.selectedIndex;
                console.log('do sth');
                });
                
                });
                
                1 Reply Last reply
                1
                • F Offline
                  F Offline
                  fbn
                  wrote on last edited by
                  #8

                  Hey @arminunruh,

                  cool, thanks for the code example, that works! :)

                  Best,
                  Florian

                  1 Reply Last reply
                  1
                  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
                  arminunruhA
                  arminunruh
                  F
                  francesco
                  L
                  lurchifon
                  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