-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Dropdown: jQuery throws with empty ID selector #21328
Comments
Support for v3 has ceased. Please let us know if your issue affects v4. |
Hmm with |
If this isn't affecting v4, we'll close it out as a won't fix. |
This is what I'm experiencing with
I appreciate that In that respect, can you please enlighten me about:
|
As it said in V3 documentation :
|
Should one understand that "keeping the URLs intact" mean clicking the link toggler won't toggle the dropdown? About the difference between |
IMO "keeping the URLs intact" means to not add Hmm yeah my bad on the difference between |
Its role is to select the dropdown menu that the button or link should toggle by ID. If you don't use jQuery produces an error in v3 because
A button is semantically more correct, the link is most often found in navbars. If you don't need to have an anchor, I would always use a button. Maybe someone else can weigh in on this though since I'm not the expert on these kinds of questions. |
@Johann-S How does it not appear in v4? The error occurs in this Bin. Even though it appears that |
Oh ok you're right sorry @hnrch02 |
* collapse-multiple-target: Use $(document).find(selector) to avoid case in twbs#20184 Muti-target support for collapse plugin make getTargets to always return a JQuery to avoid calling JQuery on the same element further down Add a dropdown test case for twbs#21328 Simplify targets.length test Simplify null check when possible Rework getSelectorFromElement to not rely on regex # Conflicts: # js/src/alert.js # js/src/dropdown.js # js/tests/unit/collapse.js
After migration to jQuery 3.x we got lots of client side exceptions caused by not rendering navbar dropdown. This is a known twitter bootstrap 3 problem: twbs/bootstrap#21328 The solution seems to be simply to remove the data-target="#" from the dropdown trigger <a>
i have the same error on drupal 8.4 and jquery 3.2.1 build-in by default, where i use bootsrap 3.3.7. |
Hello,
While following the documentation, I've stumbled upon Dropdown examples: http://getbootstrap.com/javascript/#via-data-attributes-1
When trying it with jQuery
v2.1.3
, everything works fine and clicking the anchor displays the dropdown.However, when using jQuery
v3.1.0
clicking the anchor follows the link.The text was updated successfully, but these errors were encountered: