• Hello!

    Our mobile menu is working perfectly normal…except on one page only. When you navigate to https://twaphoto.com/pricing-availability/ from the https://twaphoto.com site, the hamburger icon appears. When you tap it, however, the menu does not appear. This is only a problem on this page.

    I have purged the site cache and tried viewing the page in an incognito window, but the problem persists.

    This button/link is not a part of the regular navigation menu. it is added as code in the header.php file, along with the other button/link – which happens to be working fine. They are coded identically, so I cannot understand why one is working and not the other.

    Both of the buttons have the class “btn” applied to it, which has a float-right property. Not sure if that has anything to do with it.

    I don’t think we’ve had a problem with this, though until just recently, so I’m perplexed as to why this might be happening.

    Any suggestions would be greatly appreciated. Thanks!

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Dion Hulse

    (@dd32)

    Meta Developer

    Hi @pederweb,

    Looking at this page in a browser I can see a Javascript error is encountered on the page in question that is not present on other pages.

    This is likely due to a plugin and/or theme conflict, It looks like you might be using “Responsive Menu Pro” for your menu’s? If so, you’ll likely need to contact their support.

    If the functionality is from the theme, they may also be able to help.

    The CSS/JS minification, probably provided by your caching plugin, is preventing me easily seeing where the problematic Javascript code is coming from.

    Note: I’ve moved this thread from the “Mobile App” forum to the general fixing WordPress forum, as this is a mobile-web theme issue rather than an issue with the WordPress Mobile app

    Mayuri

    (@mayuripatel)

    Hello @pederweb

    Your one page is contains jquery error like this : https://prnt.sc/xhEaRbFky-iq , so try to check that particular page’s content contains any jquery code , or check by taking backup of that page and replace that page content with simple coming soon… text and check if menu start working or not .

    https://twaphoto.com/wp-content/uploads/rmp-menu/css/[HTTP/2 403 Forbidden 540ms]
    Uncaught TypeError: s.event.addProp is not a function

    CSS and Js issue.

    Thread Starter pederweb

    (@pederweb)

    Thanks, everyone, for your help. What I realized from your suggestions is that I’ve had a bit of code (that I had found online) in some of my pages (pages with forms – and certainly the page in question here), which is a javascript code that enables a date picker feature to pop up from text fields (instead of date fields) in a form when the text field has the class “dow-twa2hb”…

    <link rel="stylesheet" >
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
      <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
      <script>
      $( function() {
        $( ".dow-twa2hb" ).datepicker();
      } );
      </script><style type="text/css">
    @media only screen and (max-width: 767px) {
    	body {
    		background-size: auto auto !important;
    	}	
    }
    </style>

    The error code I’m getting is saying that ‘datepicker’ is not a function. I’m wondering if, possibly with the latest update of WordPress, that this function, which used to work, is no longer compatible.

    Pretty sure I got the code from this source: https://jqueryui.com/datepicker/

    Thoughts?

    • This reply was modified 1 year, 3 months ago by pederweb.
    Mayuri

    (@mayuripatel)

    Hello @pederweb

    By default JQuery file is included by WordPress so don’t include extra library like mentioned in your code above , remove below line in your code and check proper class is added to date field : https://prnt.sc/VqNCzvPmEl_H (right now there is no class added to this field like dow-twa2hb ) then try as per demo in this https://jqueryui.com/datepicker/ ,

    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    Thread Starter pederweb

    (@pederweb)

    Thank you @mayuripatel for that follow up. Your suggestion led me on a dig for proper coding in my form and page. What I discovered, after digging through all my form code, is that I had this line of code – referencing an external Google api script – which was causing the conflict:

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

    I think part of the problem was that I had this code in the form itself, instead of in the header of the page. Also, the url I was using was a little outdated. I took it out and everything finally worked fine without that code in there. I’m thinking maybe that’s because of what you referred to about the JQuery file already being included by WordPress. However, I did try putting the following updated line of code in the header of the page and that worked fine as well…

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

    Thanks again for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Mobile Menu won’t appear on only one page’ is closed to new replies.