From 56ecc6ba96550d8e66d0484c21fc20da5f8e52e6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 31 Mar 2012 12:31:56 -0700 Subject: 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 --- docs/javascript.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs/javascript.html') 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> +

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.

-- cgit v1.2.3