Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
Menu disappear after click

I've a problem with my toggle menu on wordpress site. When we are the first time on site and click on "+" icon to see submenu, submenu appears for a while and then go toggle up.

My js looks like:

(function ($) {
"use strict";
$(document).ready(function(){
    $(window).on('load', function () {
        "use strict";

    });
    $(window).on('resize', function (event, ui) {
        "use strict";
        zk_menu_touched_side();
    });
    zk_menu_touched_side();
    zk_make_menu_toggle();
    function zk_menu_touched_side(){
        "use strict";
        var $menu = $('.zk-main-nav');
        if($(window).width() > 1200 ){
            $menu.find('li').each(function(){
                var $submenu = $(this).find('> .sub-menu');
                if($submenu.length > 0){
                    if($submenu.offset().left + $submenu.outerWidth() > $(window).innerWidth()){
                        $submenu.addClass('back');
                    } else if($submenu.offset().left < 0){
                        $submenu.addClass('back');
                    }
                    /* remove css style display from mobile to desktop menu */
                    $submenu.css('display','');
                }
            });
        }
    }

It works properly after reload the page.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!