Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1276751

    HI
    You gave me this code to add my social icons to the bottom of my mobile menu.
    works great
    I just changed my menu on pc from text to icon, and am seeing the social icon on that menu also,
    and when the menu is opened then the icon in my header disappears.
    I’d like to keep the icon in the mobile burger flyout but keep it only in the header for pc.
    is that possible?

     // add social icons inside the mobile menu
    function ava_custom_script_mod_social(){
    ?>
    <script>
    (function($){
    	var int = '';
    	function a() {
    		var isMobile	 = $('.av-burger-menu-main').css('display'),
    			htmlString   = $('#header_main .social_bookmarks').find('li a'),
    			mobileMenu   = $('.av-burger-overlay'),
    			socialString = [];
    
    			if(isMobile == 'none') return;
    			if($('.burger-social').length) clearInterval(int);
    
    			htmlString.each(function() {
    				var socialClass	= $(this).parent('li').attr('class'),
    						socialItems = $(this).wrap('<li class="'+ socialClass + ' av-active-burger-items burger-social"></div>').parent().unwrap();
    				socialString.push(socialItems);
    			});
    
    			$(socialString).each(function() {
    				$(this).appendTo('#av-burger-menu-ul');
    			});
    	}
    
    	$('#header').on('mousedown', '.av-main-nav-wrap', function() {
    		int = setInterval(function() {
    			a();
    		}, 500);
    	});
    
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_custom_script_mod_social');
    • This topic was modified 3 years, 10 months ago by Munford.
    #1277628

    Hey Munford,

    Thank you for the inquiry.

    This is a better and more simple version of the script above.

    // https://kriesi.at/support/topic/fullwith-dropdown-unter-hamburger-menu-mit-social-media-icons/#post-1266922

    Please remove the current script and use that one instead. It should also fix the issue that you described above.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.