• Hello everyone.
    I have a problem with this webpage I developed.
    I’d like the flag of the language to appear outside the menu when the website is shown on mobile.
    In this way, users can easily switch language without having to search for it.

    Do you know a procedure or a tutorial that teaches:
    1. How to re write part of a webpage created with WordPress
    2. How to make this valid just for mobile (responve part) of the website.

    Many thanks!!!

    • This topic was modified 5 years, 2 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi

    Here you go add below script and CDN in the theme header or footer file.

    after adding script: https://prnt.sc/qlundl

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script>
    if (screen.width <= 767) {
    $(document).ready(function(){
    
    div1 = $('li#menu-item-627-it');
    div2 = $('.added-line');
    tdiv1 = div1.clone();
    tdiv2 = div2.clone();
    div1.replaceWith(tdiv2);
    div2.replaceWith(tdiv1);
    $('li#menu-item-627-it').attr('style','position: absolute;right: 0; top: -7px;list-style-type: none' );
    });
    
    $(document).ready(function(){
    
    div1 = $('li#menu-item-628-en');
    div2 = $('.added-line');
    tdiv1 = div1.clone();
    tdiv2 = div2.clone();
    
    div1.replaceWith(tdiv2);
    div2.replaceWith(tdiv1);
    $('li#menu-item-628-en').attr('style','position: absolute;right: 0; top: -7px;list-style-type: none' );
    
    });
    }
    </script>

    Thank you
    Praveen Valmiki

Viewing 1 replies (of 1 total)
  • The topic ‘Re arranging elements in the page’ is closed to new replies.