Git Product home page Git Product logo

Comments (6)

CWSpear avatar CWSpear commented on June 18, 2024

All things considered, that's not a terrible solution. Any other solutions I'm aware of are equally ugly.

from bootstrap-hover-dropdown.

monkeymonk avatar monkeymonk commented on June 18, 2024

A better solution should unbind completely the event handler.

I've found this solution which perfectly works for me and re-enable click or control + click on the toggle :

$(document).off('.dropdown.data-api');

from bootstrap-hover-dropdown.

blu3s0da avatar blu3s0da commented on June 18, 2024

Hi! i'm a total noob and i understand that adding $(document).off('.dropdown.data-api'); enables the click event on the dropdown if im not mistaken? if so, where do i add this line to? like it says in the plugin, it is causing some problems on mobile - dropdown is not dropping down... thank you so much in advance!

from bootstrap-hover-dropdown.

blu3s0da avatar blu3s0da commented on June 18, 2024

with a lot of reasearching, i got the dropdown to work on mobile, i replaced "ontouchstart" with "disable-ontouchstart" in the dropdown.js file and added " $atts['data-toggle'] = 'dropdown'; " to wp_bootstrap_navwalker.php

i should have explained that im working with wordpress :) thanks anyway!

from bootstrap-hover-dropdown.

CWSpear avatar CWSpear commented on June 18, 2024

Glad you figured it out then...

from bootstrap-hover-dropdown.

sarim avatar sarim commented on June 18, 2024

I also had this problem. I was using knpMenu to generate the html (customized to be compatible with bootstrap menu) for the menu. I had some menu which are external links, not dropdown. From backend i have set a attr for only those menu items and then in js used @monkeymonk 's solution.

$("[data-externlink=true]").on('click', function(){
    window.open(this.href);
});

from bootstrap-hover-dropdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.