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. General Discussion
  3. Fullscreen Slider Counter

Fullscreen Slider Counter

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 235 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.
  • K Offline
    K Offline
    kalamakumaran
    wrote on last edited by kalamakumaran
    #1

    Hi everybody,

    for anybody who is interested in having some kind of pagination/counter function for the fullscreen slider (e.g.. 1/20) I have a snippet I want to share with you.

    <div class="num"></div>
    
    <script>
    window.laytheme.on("newpageshown", function() {
        jQuery(window).on("fpAfterLoad", function() {
             var slideNumber = jQuery('.fp-section.active').index() -4;
             var numSections = jQuery('.fp-section').length;
         
             jQuery('.num').html(slideNumber + '/' + numSections)
        });
    });
    </script>
    

    I don't why know but my counter only starts from 0 when I put -4 in the function. That probably needs to be adjusted in your case.

    btw: code works for me with vertical fullscreen slider and auto-scrolling turned on.

    Enjoy!

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

      Dear @kalamakumaran

      Thank you for the Code! 💥
      Fullscreen Slider Addon comes with 'pagination' :)


      Best wishes
      Richard
      1 Reply Last reply
      0
      • fabiandraxlF Offline
        fabiandraxlF Offline
        fabiandraxl
        wrote on last edited by
        #3

        Hej @Richard and @kalamakumaran

        The Code seams not to work anymore, did something change in the meantime?

        Tank you in advance and best regards,
        Fabian

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kalamakumaran
          wrote on last edited by
          #4

          For me it still works.
          What exactly doesn’t work in your case?
          Maybe I can help.

          fabiandraxlF 1 Reply Last reply
          1
          • K kalamakumaran

            For me it still works.
            What exactly doesn’t work in your case?
            Maybe I can help.

            fabiandraxlF Offline
            fabiandraxlF Offline
            fabiandraxl
            wrote on last edited by
            #5

            Hej @kalamakumaran

            Thank you so much for trying to help out. :)

            I added the <script> and added the div but it does not show my row count and neither the actual row, it always shows me -4/1 ... have a look here: https://new.fabiandraxl.com/jaga/

            So i think it has to do with something with the javascript which is not able to fetch the corresponding sections etc?!

            Thank you and best regards,
            Fabian

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kalamakumaran
              wrote on last edited by kalamakumaran
              #6

              Could be that the code is for any reason only working for the vertical fullscreen slider.

              Why don't you just use the carousel plugin for a horizontal slideshow? There you can set up a counter without custom code.

              Sorry that I can't help you any further with that.

              Awesome website btw.

              fabiandraxlF 1 Reply Last reply
              0
              • K kalamakumaran

                Could be that the code is for any reason only working for the vertical fullscreen slider.

                Why don't you just use the carousel plugin for a horizontal slideshow? There you can set up a counter without custom code.

                Sorry that I can't help you any further with that.

                Awesome website btw.

                fabiandraxlF Offline
                fabiandraxlF Offline
                fabiandraxl
                wrote on last edited by
                #7

                Hej @kalamakumaran,

                Could be, but I personally have no clue. :P haha

                Carousel is not that customizable, the side I showcased here was just an example wanted to built much more complex slides with the Gridder, which are not possible with the carousel plugin.

                Thank you and have a great week!

                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