diff options
| author | Mark Otto <[email protected]> | 2012-03-31 12:31:56 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-03-31 12:31:56 -0700 |
| commit | 56ecc6ba96550d8e66d0484c21fc20da5f8e52e6 (patch) | |
| tree | 0f7723bd1c73c7b1e27e4863af3b7ddc468a39f4 | |
| parent | 37745cd8997bdc1d0bb21c276a7aa671bb018eed (diff) | |
| download | bootstrap-56ecc6ba96550d8e66d0484c21fc20da5f8e52e6.tar.xz bootstrap-56ecc6ba96550d8e66d0484c21fc20da5f8e52e6.zip | |
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
| -rw-r--r-- | docs/assets/bootstrap.zip | bin | 56907 -> 56907 bytes | |||
| -rw-r--r-- | docs/javascript.html | 14 | ||||
| -rw-r--r-- | docs/templates/pages/javascript.mustache | 14 | ||||
| -rw-r--r-- | less/tests/css-tests.html | 43 |
4 files changed, 71 insertions, 0 deletions
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip Binary files differindex 8711ab2e7..7f95f01c6 100644 --- a/docs/assets/bootstrap.zip +++ b/docs/assets/bootstrap.zip diff --git a/docs/javascript.html b/docs/javascript.html index 4f777e031..2a0f3d861 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -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> diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index d61a364f0..bb25f0957 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -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> diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 42cdab045..f6f4b2351 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -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> |
