Commit 0f25df1d authored by Pierre-Denis Vanduynslager's avatar Pierre-Denis Vanduynslager
Browse files

Fix dropdown example in docs (Fix #20410)

parent 27cf3d67
17 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!26437merge,!20778V4 dev,!20539Allow multiple modals,!20434Fix dropdown example in docs (Fix #20410),!20493V4 dev display,!20636Fix docs for heading sizes,!22391V4 dev,!22547Finished a new translation for bootstrap,!22143Fix selectable disabled toggle radio buttons,!22598test,!21067dfsa,!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!17021v4
Showing with 1 addition and 15 deletions
+1 -15
......@@ -36,7 +36,7 @@ And with `<a>` elements:
{% example html %}
<div class="dropdown open">
<a class="btn btn-secondary dropdown-toggle" href="http://example.com" id="dropdownMenuLink" data-target="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a class="btn btn-secondary dropdown-toggle" href="http://example.com" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown link
</a>
......@@ -500,20 +500,6 @@ Add `data-toggle="dropdown"` to a link or button to toggle a dropdown.
</div>
{% endhighlight %}
To keep URLs intact with link buttons, use the `data-target` attribute instead of `href="#"`.
{% highlight html %}
<div class="dropdown">
<a id="dLabel" data-target="#" href="http://example.com" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown trigger
</a>
<div class="dropdown-menu" aria-labelledby="dLabel">
...
</div>
</div>
{% endhighlight %}
### Via JavaScript
Call the dropdowns via JavaScript:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment