Show a menu item after site fully loaded

I need to show a change language menu item after my WordPress site is fully loaded. I edited the menu item css into my menu item:

.my-menu-item {
    visibility: hidden;

and in my functions.php file i added as follows:

add_action( 'wp_loaded', 'menushow', 99 );      

function menushow() { ?>
    <script type='text/javascript'>
        /* <![CDATA[ */
        jQuery(window).load(function() {
            // When the page has loaded
            jQuery(".my-menu-item").css("visibility", "true");
        /* ]]> */
<?php }

but the problem it’s not working. Please help me out here…

Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.