1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-01 17:32:41 +02: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:
Mark Otto
2012-03-31 12:31:56 -07:00
parent 37745cd899
commit 56ecc6ba96
4 changed files with 71 additions and 0 deletions

Binary file not shown.

View File

@@ -493,6 +493,20 @@ $('#myModal').on('hidden', function () {
</li>
...
&lt;/ul&gt;</pre>
<p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
<pre class="prettyprint linenums">
&lt;ul class="nav nav-pills"&gt;
&lt;li class="dropdown"&gt;
&lt;a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html"&gt;
Dropdown
&lt;b class="caret"&gt;&lt;/b&gt;
&lt;/a&gt;
&lt;ul class="dropdown-menu"&gt;
...
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</pre>
<h3>Methods</h3>
<h4>$().dropdown()</h4>
<p>A programatic api for activating menus for a given navbar or tabbed navigation.</p>

View File

@@ -416,6 +416,20 @@ $('#myModal').on('hidden', function () {
&lt;/li&gt;
...
&lt;/ul&gt;</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">
&lt;ul class="nav nav-pills"&gt;
&lt;li class="dropdown"&gt;
&lt;a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html"&gt;
{{_i}}Dropdown{{/i}}
&lt;b class="caret"&gt;&lt;/b&gt;
&lt;/a&gt;
&lt;ul class="dropdown-menu"&gt;
...
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</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>