mirror of https://github.com/twbs/bootstrap.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
This commit is contained in:
		
							parent
							
								
									37745cd899
								
							
						
					
					
						commit
						56ecc6ba96
					
				
										
											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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 New Issue