Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra menu title appearing under dropdown menu while in data tables tab #40

Open
BanyarSawThit opened this issue Jun 22, 2019 · 2 comments

Comments

@BanyarSawThit
Copy link

Subject of the issue

*Data table *Data table script(datatables.min.js) side effect on "dropdown-menu" class. Check out navigation bar while in data table

Your environment

Chrome and IE

Steps to reproduce

Expected behaviour

Actual behaviour

Extra dropdown title appearing under its own dropdown menu

@j8n
Copy link

j8n commented Sep 26, 2019

The problem is in the main.js file.
The script prepends a 'li' element on every click event
I just commented the line for now and it works fine (without the subtitle)
It must prepend it only once or remove it on close

$(".menu-item-has-children.dropdown").each(function() {
$(this).on('click', function() {
var $temp_text = $(this).children('.dropdown-toggle').html();
// problem
//$(this).children('.sub-menu').prepend('< li class="subtitle">' + $temp_text + '');
});
});

Edit: I removed it all

@riazahmadshigri
Copy link

replace this code with one that already there to fix
$(".menu-item-has-children.dropdown").each(function() {
$(this).one('click', function() {
var $temp_text = $(this).children('.dropdown-toggle').html();
$(this).children('.sub-menu').prepend('

  • ' + $temp_text + '
  • ');
    $('#menu-item-has-children.dropdown').off('click');
    });
    });

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants