Mdb-ui-kit: jQuery 3.* it's supported?

Created on 23 Feb 2017  路  7Comments  路  Source: mdbootstrap/mdb-ui-kit

jQuery 3.* it's supported?

Example: https://jsfiddle.net/snessnes/vxr1vLyu/

Elements not show normally and errors in console when click links.

Uncaught Error: Syntax error, unrecognized expression: #
at Function.ga.error (jquery.min.js:2)
at ga.tokenize (jquery.min.js:2)
at ga.select (jquery.min.js:2)
at Function.ga [as find] (jquery.min.js:2)
at r.fn.init.find (jquery.min.js:2)
at r.fn.init (jquery.min.js:2)
at r (jquery.min.js:2)
at b (bootstrap.min.js:6)
at HTMLAnchorElement. (bootstrap.min.js:6)
at Function.each (jquery.min.js:2)

Most helpful comment

For our project 4Minitz we had the same issue - after migrating from jQuery 2.x to jQuer 3.x. It seems the root cause was a breaking incompatibility of Twitter Bootstrap2 => Bootstrap3 migration. (see comment of @migerh above).

To make a long story short:
This dropdown trigger broke our whole application:
<a href="#" id="navbar-usermenu" data-target="#" class="dropdown-toggle" data-toggle="dropdown">

To fix it, we removed this attribute: data-target="#" - the attribute is only needed when dropdown-trigger and dropdown-menu are not direct siblings and are locate apart from each other. Now this works for us:

<a href="#" id="navbar-usermenu" class="dropdown-toggle" data-toggle="dropdown">

Now everything works fine - even with jQuery v3 & Bootstrap v3!

All 7 comments

it should support what bootstrap supports

View example throw errors with jQuery 3.* , but with 2.* not

Are you sure these errors are thrown by the JS shipped with this theme? To me it looks like it's bootstrap.min.js fault

I using Oficial jQuery 3.1.1 with Oficial bootstrap 3.3.7
Can you provide me a example using this technology?

Seems to be a known problem in bootstrap: https://github.com/twbs/bootstrap/issues/21328

For our project 4Minitz we had the same issue - after migrating from jQuery 2.x to jQuer 3.x. It seems the root cause was a breaking incompatibility of Twitter Bootstrap2 => Bootstrap3 migration. (see comment of @migerh above).

To make a long story short:
This dropdown trigger broke our whole application:
<a href="#" id="navbar-usermenu" data-target="#" class="dropdown-toggle" data-toggle="dropdown">

To fix it, we removed this attribute: data-target="#" - the attribute is only needed when dropdown-trigger and dropdown-menu are not direct siblings and are locate apart from each other. Now this works for us:

<a href="#" id="navbar-usermenu" class="dropdown-toggle" data-toggle="dropdown">

Now everything works fine - even with jQuery v3 & Bootstrap v3!

Other workarround, update to bootstrap 3.4.1. The dropdown now works without jQuery.

https://github.com/twbs/bootstrap/commit/90261b484c7637407b310acecdfe56093738800d

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tahq69 picture tahq69  路  8Comments

ViRuSTriNiTy picture ViRuSTriNiTy  路  6Comments

rajavijayavendan picture rajavijayavendan  路  7Comments

AlexanderPilhar picture AlexanderPilhar  路  3Comments

migaber picture migaber  路  10Comments