-2

I'm building a website called zorgenbijstand.nl

I have made an submenu on "geschiedenis". This works fine, on all devices using firefox responsive design-mode. Now I have placed the site "live". On my iphone 6s the submenu won't select and close on click. I am doing something wrong, but what? It's an joomla 3.7.0 site.

(function($){
$(document).ready(function () {
    // Dropdown menu
    if ($('.parent').children('ul').length > 0) {
        $('.parent').addClass('dropdown');
        $('.parent > a').addClass('dropdown-toggle');
        $('.parent > a').attr('data-toggle', 'dropdown');
        $('.parent > a').append('');
        $('.parent > ul').addClass('dropdown-menu');
    }
ICE
  • 1,667
  • 2
  • 21
  • 43

1 Answers1

0

That script works fine. Works on iPhone and Android as well. but the problem coming from another part of the code.

When you are not in the geschiedenis page your main menu doesn't have ul submenu in it:

no sub menu

and what you have in geschiedenis page:

ul that related to the submenu

Then you know this if condition will always be false:

if ($('.parent').children('ul').length > 0)

because there isn't any ul child in it.

ICE
  • 1,667
  • 2
  • 21
  • 43