• 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

Change colour of sitetitle on black row — Not working after update

Scheduled Pinned Locked Moved General Discussion
8 Posts 4 Posters 101 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.
  • A Offline
    A Offline
    acmarion
    wrote on last edited by
    #1

    Hi!

    I used the code I found in 2 older threads to make my navigation (site title + menu) change from black to white when it's over a black background (class id: blackrow), it was working for a while then I came back in the admin and updated and now it's not working.

    Here is the code I am using:

    Custom CSS:

    /* Nav color change */
    .blackrow {
        background: #0e0e0e;
    }
    
    .white {
        color: #f2f2f2;
    }
    

    Custom HTML at bottom:

    <!--Nav color change-->
    <script>
        var offset = 50;
        var $blackRows;
        var $nav;
        
        Frontend.GlobalEvents.on("newpageshown", function(layoutObj, type, obj){
            $blackRows = jQuery(".blackrow");
            $practice = jQuery(".info-centre-top");
            $mobiletitle = jQuery(".mobile-title span");
            $information = jQuery(".laynav span");
            $nav = jQuery(".navbar");
            $nav.removeClass("white");
            $sitetitle = jQuery(".sitetitle span");
        });
        
        jQuery(document).on("scroll", function(){
    
            $blackRows.each(function(){
                var rect = this.getBoundingClientRect();
                if(rect.top - offset < 0 && rect.bottom - offset > 0){
                    $sitetitle.addClass("white");
                    $mobiletitle.addClass("white");
                    $practice.addClass("white");
                    $information.addClass("white");
                    return false;
                }else{
                    $sitetitle.removeClass("white");
                    $mobiletitle.removeClass("white");
                    $practice.removeClass("white");
                    $information.removeClass("white");
                }
            });
        });
    </script>
    

    Does anyone know why it's not working anymore?

    Thanks!

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

    Dear @acmarion

    Apologies for the late reply over the weekend,
    It makes me curious that possibly since the last update one of the Classes is now called something slightly different and this has caused a problem

    However
    I will forward this To Armin for a deeper look!

    Thank you for your patience and for using Lay Theme

    Best wishes
    Sincerely
    Richard

    A 1 Reply Last reply
    0
  • arminunruhA Offline
    arminunruhA Offline
    arminunruh Global Moderator
    wrote on last edited by
    #3

    please always post your website address.

    can you send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    acmarion
    replied to arminunruh on last edited by acmarion
    #4

    @arminunruh I just sent you an email with the info you requested.

    Also my website (work in progress) is dev.alexiscoutumarion.com

    Thanks!

    1 Reply Last reply
    0
  • A Offline
    A Offline
    acmarion
    replied to Richard on last edited by
    #5

    @Richard-Keith Thanks for you reply. I also think that some Classes names used in the code have changed during the update.

    1 Reply Last reply
    0
  • E Offline
    E Offline
    emidio
    wrote on last edited by
    #6

    I am having the same problem. how did you solved it?

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    acmarion
    replied to emidio on last edited by
    #7

    @emidio Armin helped me by looking at the code, here was his answer:

    you need to use window.laytheme.on

    instead of

    Frontend.Globalevents.on

    as written in the doc:
    http://laytheme.com/documentation.html#custom-javascript

    Sorry for the late reply, I didn't log in for a while.

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

    Dear @acmarion

    Thanks for posting!

    Best
    Richard

    1 Reply Last reply
    0

Before you post:

Use the Search Feature. Maybe there is already a solution to your issue.

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

Now see if your problem solved itself.

Go here, see if your problem is listed here:
Troubleshooting

When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it

Thanks!
Post a link to where the problem is if possible, please <3
I don't answer or check forum DMs, please just post on the forum.
Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
Online Users
laytheme.com
  • Login

  • Don't have an account? Register

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

  • Don't have an account? Register

  • Login or register to search.