Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1284524
    Mastres
    Participant

    Hi i’m trying to change the logo in the mobile version as i see in another post forum, but don’t work for me

    jQuery(document).ready(function($){
    var width = $(window).width();
    var logo_src = $(“.x-brand img”).attr(“src”);

    if(width < 980) {
    $(“.x-brand img”).attr(“src”, “http://www.raquel-davalos.com/wp-content/uploads/2016/12/Logo-Raquel-Davalos-horizontal.png&#8221;);
    }
    else {
    $(“.x-brand img”).attr(“src”, logo_src);
    }
    });

    Regards

    #1284616
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! You have enabled under construction mode. Could you please try this code instead.

    
    (function($) {
      if ($(window).width() < 980) {
        $(".x-brand img").attr("src", "http://path.to/your/image.png")
      }
    })(jQuery);
    

    Hope that helps.

    #1284704
    Mastres
    Participant

    Don’t work, i try with the code and then with this other

    jQuery(document).ready(function($) {
    if ($(window).width() < 980) {
    $(“.x-brand img”).attr(“src”, “http://path.to/your/image.png&#8221;)
    }
    })(jQuery);

    #1284763
    Joao
    Moderator

    Hi There,

    Please use this instead:

    @media (max-width: 979px){
        .x-brand.img {
            background: url(http://placehold.it/200x50) no-repeat center center;
            background-size: 100% 100%;
        }
        .x-brand.img img {
            opacity: 0;
        }
    }

    Hope it helps

    Joao

    #1284979
    Mastres
    Participant

    Ok, thanks 🙂

    #1285092
    Joao
    Moderator

    Hi There,

    Let us know if you need help with another adjustments.

    Thanks

  • <script> jQuery(function($){ $("#no-reply-1284524 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>