From: Mark Otto Date: Sat, 31 Mar 2012 19:31:56 +0000 (-0700) Subject: clarify use of dropdowns, href, and data-target for js docs; add tests to css tests... X-Git-Tag: v2.0.3~5^2~56^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56ecc6ba96550d8e66d0484c21fc20da5f8e52e6;p=thirdparty%2Fbootstrap.git 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 --- diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index 8711ab2e7b..7f95f01c69 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/javascript.html b/docs/javascript.html index 4f777e0312..2a0f3d861f 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -493,6 +493,20 @@ $('#myModal').on('hidden', function () { </li> ... </ul> +

To keep URLs intact, use the data-target attribute instead of href="#".

+
+<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>
+

Methods

$().dropdown()

A programatic api for activating menus for a given navbar or tabbed navigation.

diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index d61a364f03..bb25f09572 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -416,6 +416,20 @@ $('#myModal').on('hidden', function () { </li> ... </ul> +

{{_i}}To keep URLs intact, use the data-target attribute instead of href="#".{{/i}}

+
+<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>
+

{{_i}}Methods{{/i}}

$().dropdown()

{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}

diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 42cdab0457..f6f4b2351c 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -330,8 +330,51 @@ +
+ + + + +

Dropdown link with hash URL

+ + +

Dropdown link with custom URL and data-target

+