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. Different menu color for each slide on Fullscreen slider

Different menu color for each slide on Fullscreen slider

Scheduled Pinned Locked Moved Addons
sliderfullscreencolor
30 Posts 9 Posters 5.0k 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.
  • M Offline
    M Offline
    MAN
    wrote on last edited by
    #1

    Hey Armin,

    Is it possible with some CSS to change the site title and menu color for individual slides on Fullscreen slider? I have some dark and some lighter ones and it would be great.

    Thanks

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

      Hey MAN!
      Using the "fpOnLeave" event you can see which slide you are on and do changes to your site accordingly. I hope this is pointing you in the right direction.

      <script>
      jQuery(window).on('fpOnLeave', function(event, data){
          console.log('event', event);
          console.log('data', data);
      });
      </script>
      
      1 Reply Last reply
      0
      • arminunruhA Online
        arminunruhA Online
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        hey MAN!

        I just realized that there is an easier way to do what you want.

        For pages where fullscreen slider is active you will always have body classes like that:

        fp-viewing-0
        

        the 0 can be a 1, 2, 3 etc. If you combine that class with your body slug-* class you can style your site title and menu as you want:

        body.slug-yourpageslug.fp-viewing-0 .sitetitle{
        
        }
        body.slug-yourpageslug.fp-viewing-0 nav.primary{
        
        }
        

        Find out more about the slug body class here: http://laytheme.com/documentation.html#css-based-on-current-page

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MAN
          wrote on last edited by
          #4

          Awesome! Thanks!

          A 1 Reply Last reply
          0
          • M MAN

            Awesome! Thanks!

            A Offline
            A Offline
            antonioprado
            wrote on last edited by
            #5

            @MAN Hi Man! Could you use different menu color for each slide? Can you give me some light about how to do it? I'm really lost about this... I'll really appreciate your help!

            Thank you!!

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

              hey antonio, can you show me the css code you are using to try and make the slides have different colors?

              A 1 Reply Last reply
              0
              • arminunruhA arminunruh

                hey antonio, can you show me the css code you are using to try and make the slides have different colors?

                A Offline
                A Offline
                antonioprado
                wrote on last edited by
                #7

                @arminunruh Hi Armin! Thank you for the answer! I think the code I'm using is wrong... i just follow the documentation about css based on current page and it worked very well, even on mobile size (burger icon, etc.), but when I try to do the same process on slides nothing happens... I copied the code you wrote:

                body.slug-yourpageslug.fp-viewing-0 .sitetitle{

                }
                body.slug-yourpageslug.fp-viewing-0 nav.primary{

                }

                From my ignorant perspective, fp-viewing-0 make reference to the first slide right? fp-viewing-1 is the second, and so far... I really don't know :(

                I copy the code I'm using:

                .id-23.fp-viewing-0 .sitetitle{
                color: white;
                }
                .id-23.fp-viewing-0 nav.primary{
                color: white;
                }

                .id-23.fp-viewing-1 .sitetitle{
                color: black;
                }
                .id-23.fp-viewing-1 nav.primary{
                color: black;
                }

                Thank you!!! :D

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

                  Oh, I changed the html markup a bit with the latest updates. This way it should work:

                  body.fp-viewing-0 .sitetitle-txt-inner span{
                      color: pink;
                  }
                  body.fp-viewing-0 nav.primary a{
                      color: pink;
                  }
                  
                  A Hayo GebauerH 2 Replies Last reply
                  0
                  • arminunruhA arminunruh

                    Oh, I changed the html markup a bit with the latest updates. This way it should work:

                    body.fp-viewing-0 .sitetitle-txt-inner span{
                        color: pink;
                    }
                    body.fp-viewing-0 nav.primary a{
                        color: pink;
                    }
                    
                    A Offline
                    A Offline
                    antonioprado
                    wrote on last edited by
                    #9

                    @arminunruh Hello Armin!! Thank you very much! It works very well!!! :D

                    The only thing is when "Scrolling down in the last section scrolls down to the first section" is activated, when the last slide goes to the first one, this "effect" does not work... Is there any way for it to work when this option is activated?

                    Thank you again!!

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

                      Hey Antonio!

                      I was able to reproduce the issue you were talking about.
                      In fact you are right.

                      When you activate the "Scrolling down in the last section scrolls down to the first section" and scroll down the .fp-viewing-0 changes to .fp-viewing-1 and does not change back to .fp-viewing-0 when you continue scrolling more down.

                      That means that your custom CSS code does not work anymore:

                      body.fp-viewing-0 .sitetitle-txt-inner span{
                          color: pink;
                      }
                      body.fp-viewing-0 nav.primary a{
                          color: pink;
                      }
                      

                      What you can do is to activate the CSS also for the second slide. That is a compromise until we will have fixed that issue.

                      body.fp-viewing-0 .sitetitle-txt-inner span,
                      body.fp-viewing-1 .sitetitle-txt-inner span{
                          color: pink;
                      }
                      
                      body.fp-viewing-0 nav.primary a,
                      body.fp-viewing-1 nav.primary a{
                          color: pink;
                      }
                      

                      I hope I could help!

                      Let us know if you have further questions!

                      All the best!

                      Marius

                      www.mariusjopen.world

                      A 1 Reply Last reply
                      0
                      • mariusjopenM mariusjopen

                        Hey Antonio!

                        I was able to reproduce the issue you were talking about.
                        In fact you are right.

                        When you activate the "Scrolling down in the last section scrolls down to the first section" and scroll down the .fp-viewing-0 changes to .fp-viewing-1 and does not change back to .fp-viewing-0 when you continue scrolling more down.

                        That means that your custom CSS code does not work anymore:

                        body.fp-viewing-0 .sitetitle-txt-inner span{
                            color: pink;
                        }
                        body.fp-viewing-0 nav.primary a{
                            color: pink;
                        }
                        

                        What you can do is to activate the CSS also for the second slide. That is a compromise until we will have fixed that issue.

                        body.fp-viewing-0 .sitetitle-txt-inner span,
                        body.fp-viewing-1 .sitetitle-txt-inner span{
                            color: pink;
                        }
                        
                        body.fp-viewing-0 nav.primary a,
                        body.fp-viewing-1 nav.primary a{
                            color: pink;
                        }
                        

                        I hope I could help!

                        Let us know if you have further questions!

                        All the best!

                        Marius

                        A Offline
                        A Offline
                        antonioprado
                        wrote on last edited by
                        #11

                        @mariusjopen Hello Marius! Wow! That really helps! Thank you very much for the answer and the patient! Both of you!

                        Have a nice week guys! :)

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

                          Hi Antonio!

                          Great! Very happy to hear :-)

                          www.mariusjopen.world

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            adam
                            wrote on last edited by
                            #13

                            Hey guys, this post has been really helpful in getting the navbar and site title changing. I am trying to get the same change happening on text within a full-page slider however the only success I have had is when I target the universal setting of my text-formats.

                            for example

                            body.fp-viewing-1 .text .lay-textformat-parent > *, ._Default, ._Heading {
                            color: #FFFFFF;
                            }

                            This works however it doesn't change out when landing on a different slide. Basically I need to target slide 1, 3, 5, 7 and 8.

                            Any help would be great!

                            Thank you

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

                              Hey Adam,

                              it is a bit complicated to solve this issue without actually knowing the site.

                              Can you provide us with a link?

                              All the best!

                              Marius

                              www.mariusjopen.world

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                dgknkrpnr
                                wrote on last edited by
                                #15

                                @mariusjopen said in Different menu color for each slide on Fullscreen slider:

                                Hey Antonio!

                                I was able to reproduce the issue you were talking about.
                                In fact you are right.

                                When you activate the "Scrolling down in the last section scrolls down to the first section" and scroll down the .fp-viewing-0 changes to .fp-viewing-1 and does not change back to .fp-viewing-0 when you continue scrolling more down.

                                That means that your custom CSS code does not work anymore:

                                body.fp-viewing-0 .sitetitle-txt-inner span{
                                    color: pink;
                                }
                                body.fp-viewing-0 nav.primary a{
                                    color: pink;
                                }
                                

                                What you can do is to activate the CSS also for the second slide. That is a compromise until we will have fixed that issue.

                                body.fp-viewing-0 .sitetitle-txt-inner span,
                                body.fp-viewing-1 .sitetitle-txt-inner span{
                                    color: pink;
                                }
                                
                                body.fp-viewing-0 nav.primary a,
                                body.fp-viewing-1 nav.primary a{
                                    color: pink;
                                }
                                

                                I hope I could help!

                                Let us know if you have further questions!

                                All the best!

                                Marius

                                @mariusjopen Is there a way to use this technique without using fp-viewing classes? I want to give a single class to all rows with same color using "Set HTML class & ID" option (lets name this class "blackbg"). And I want to change menu color when we are looking to blackbg slide (or when it have "active" class too)

                                If I use fp-viewing classes I have to write different slug classes for every project in custom css because slides with black background isn't have same order. My projects have different slide count.

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

                                  Hi dgknkrpnr!

                                  Well, if you want to have a specific color for a slide you need to use those classes. They are the only class which allows you to style this specific slide.

                                  But maybe that helps:
                                  0_1500457070092_Bildschirmfoto 2017-07-19 um 11.37.31.png

                                  Then you can call each row by its own.

                                  Best!

                                  Marius

                                  www.mariusjopen.world

                                  1 Reply Last reply
                                  0
                                  • Hayo GebauerH Offline
                                    Hayo GebauerH Offline
                                    Hayo Gebauer
                                    wrote on last edited by Hayo Gebauer
                                    #17

                                    Is it possible to delay the color switching?
                                    The first slide I have the menu/title in white (opposed to black like in the rest of the slides)
                                    When i scroll from the first slide, the white instantly switches to black, but it would be nice to have a 700ms delay (duration of the fullscreen slide)

                                    edit: adding "transition-delay: 700ms" does not work, it delays the appearance of the white font by 700ms, but not the switching to black.

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

                                      Dear @Hayo-Gebauer
                                      with jQuery you can add a wait or delay effect.

                                      Best!

                                      Marius

                                      www.mariusjopen.world

                                      1 Reply Last reply
                                      0
                                      • arminunruhA arminunruh

                                        Oh, I changed the html markup a bit with the latest updates. This way it should work:

                                        body.fp-viewing-0 .sitetitle-txt-inner span{
                                            color: pink;
                                        }
                                        body.fp-viewing-0 nav.primary a{
                                            color: pink;
                                        }
                                        
                                        Hayo GebauerH Offline
                                        Hayo GebauerH Offline
                                        Hayo Gebauer
                                        wrote on last edited by
                                        #19

                                        @arminunruh This doesn't work in the current version of Laytheme, am I right?

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

                                          Dear @MAN
                                          you probably need to hack yourself through this…

                                          Best!

                                          Marius

                                          www.mariusjopen.world

                                          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
                                          V
                                          vonMatthias
                                          R
                                          ruwie
                                          arminunruhA
                                          arminunruh
                                          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