mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
clarify use of dropdowns, href, and data-target for js docs; add tests to css tests page for it's display and execution in html
This commit is contained in:
parent
37745cd899
commit
56ecc6ba96
4 changed files with 71 additions and 0 deletions
Binary file not shown.
|
@ -493,6 +493,20 @@ $('#myModal').on('hidden', function () {
|
|||
</li>
|
||||
...
|
||||
</ul></pre>
|
||||
<p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html">
|
||||
Dropdown
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
...
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</pre>
|
||||
<h3>Methods</h3>
|
||||
<h4>$().dropdown()</h4>
|
||||
<p>A programatic api for activating menus for a given navbar or tabbed navigation.</p>
|
||||
|
|
14
docs/templates/pages/javascript.mustache
vendored
14
docs/templates/pages/javascript.mustache
vendored
|
@ -416,6 +416,20 @@ $('#myModal').on('hidden', function () {
|
|||
</li>
|
||||
...
|
||||
</ul></pre>
|
||||
<p>{{_i}}To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.{{/i}}</p>
|
||||
<pre class="prettyprint linenums">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html">
|
||||
{{_i}}Dropdown{{/i}}
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
...
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</pre>
|
||||
<h3>{{_i}}Methods{{/i}}</h3>
|
||||
<h4>$().dropdown()</h4>
|
||||
<p>{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}</p>
|
||||
|
|
|
@ -330,8 +330,51 @@
|
|||
</div><!--/row-->
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Dropdowns
|
||||
================================================== -->
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Dropdowns</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>Dropdown link with hash URL</h4>
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a href="#">Link</a></li>
|
||||
<li><a href="#">Example link</a></li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Dropdown <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Dropdown link with custom URL and data-target</h4>
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a href="#">Link</a></li>
|
||||
<li><a href="#">Example link</a></li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html">
|
||||
Dropdown <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue