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

D

dmlzr

@dmlzr
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Different menu color for each slide on Fullscreen slider
    D dmlzr

    Hey @mariusjopen ,
    thanks a lot for the link. And yes this is a hard one for me.
    I saw this fullpage.js already and tried to use the 'fpAfterLoad' described here: http://laythemeforum.com:4567/topic/4437/change-colour-of-sitetitle-on-black-row-backgrounds
    But I didn't get it to work. Perhaps you could give me a hint.
    Anyway I found a (not very elegant) workaround. I run the colorchange funtion several times after the slider has been clicked. That pretty much does the trick.
    Greets!
    David

    Addons slider fullscreen color

  • Different menu color for each slide on Fullscreen slider
    D dmlzr

    Hi @mariusjopen,
    I changed the onclick but I'm not sure if that's the problem.
    I want to click on the current slide and if the next slide has the class blackrow the menu color should change. But the onclick is happening before the next slide has loaded. How can I check if the next slide has a certain class? Or else run the function after the next slide has loaded?

    Greets!

    Addons slider fullscreen color

  • Different menu color for each slide on Fullscreen slider
    D dmlzr

    Tanks @mariusjopen for the qick response.

    I think the problem is that the on("click") event happens before the slide changes. So the current .blackrow still has the class .active.
    Is there a way to target the next slide?
    Or alternatively run the on("click") after leaving the current slide?

    Thanks
    David

    Addons slider fullscreen color

  • Different menu color for each slide on Fullscreen slider
    D dmlzr

    Hi @mariusjopen, thanks for the support.
    I'm also trying to make this work.
    I want to adress a slide by its class and change the menu color if the slide is shown.
    I tried this it by checking if it has the class "active" and I get a disturbingly random result. Sometimes it gets it right sometimes not.
    Here's what I did:

    <script>
        var $blackRows;
        var $nav;
        var $title;
    
        Frontend.GlobalEvents.on("newpageshown", function(layoutObj, type, obj){
            $blackRows = jQuery(".blackrow");
            $nav = jQuery("nav");
            $title = jQuery(".sitetitle-txt-inner");
            $nav.removeClass("white");
            $title.removeClass("white");        
        });
    
        function colorchanger() {
                if($blackRows.hasClass("active")){
                    $nav.addClass("white");
                    $title.addClass("white");
                    return false;
                }else{
                    $nav.removeClass("white");
                    $title.removeClass("white");
                }
        }
        jQuery(document).on("click", function(){
          colorchanger();
        });
    </script>
    

    Did I miss something?
    What's the best way to target the current slide?

    Thanks!
    David

    Addons slider fullscreen color
  • Login

  • Don't have an account? Register

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