mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-25 22:41:20 +02:00
few more js doc wording changes
This commit is contained in:
@@ -146,19 +146,11 @@ $('#my-modal').modal({
|
||||
<pre class="prettyprint linenums">$('#my-modal').modal(true)</pre>
|
||||
<p><span class="label notice">Notice</span> Alternatively, this can be retrieved with <code>$().data('modal')</code>.</p>
|
||||
<h3>Events</h3>
|
||||
<p>Bootstrap's modal class exposes a few events for hooking into modal functionality. The include:</p>
|
||||
|
||||
<!-- <ul>
|
||||
<li><strong>show</strong> - This event fires immediately when the <code>show</code> instance method is called.</li>
|
||||
<li><strong>shown</strong> - This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).</li>
|
||||
<li><strong>hide</strong> - This event is fired immediately when the <code>hide</code> instance method has been called.</li>
|
||||
<li><strong>hidden</strong> - This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).</li>
|
||||
</ul> -->
|
||||
|
||||
<p>Bootstrap's modal class exposes a few events for hooking into modal functionality. </p>
|
||||
<table class="zebra-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Name</th>
|
||||
<th style="width: 150px;">Event</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -229,7 +221,7 @@ $('#my-modal').bind('hidden', function () {
|
||||
<pre class="prettyprint linenums">
|
||||
<ul class="tabs">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li class="dropdown" data-dropdown>
|
||||
<li class="dropdown" data-dropdown="x" >
|
||||
<a href="#" class="dropdown-toggle">Dropdown</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Secondary link</a></li>
|
||||
@@ -303,20 +295,20 @@ $('#my-modal').bind('hidden', function () {
|
||||
<pre class="prettyprint linenums">$('#topbar').dropdown()</pre>
|
||||
<h3>Markup</h3>
|
||||
<p>To easily add scrollspy behavior to your nav, just add the <code>data-scrollspy</code> attribute to the <code>.topbar</code>.
|
||||
<pre class="prettyprint linenums"><div class="topbar" data-scrollspy >...</div></pre>
|
||||
<pre class="prettyprint linenums"><div class="topbar" data-scrollspy="x" >...</div></pre>
|
||||
<h3>Methods</h3>
|
||||
<h4>$().scrollspy()</h4>
|
||||
<p>
|
||||
Auto activates navigation buttons by users scroll position.
|
||||
</p>
|
||||
<pre class="prettyprint linenums">$('body > .topbar').scrollSpy()</pre>
|
||||
<p><span class="label notice">Notice</span> Topbar anchor tags must have resolvable id targets. For example, a <code><a href="#home">home</a></code> might correspond to a <code><div id="home"></div></code>.
|
||||
<p><span class="label notice">Notice</span> Topbar anchor tags must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the dom like <code><div id="home"></div></code>.
|
||||
</p>
|
||||
<h4>.scrollspy('refresh')</h4>
|
||||
<p>The scrollspy caches nav buttons and section coordinates for performance. If you need to update this cache (likely if you have dynamic content) just call this refresh method. If you used the data attribute to define your scrollspy, just call refresh on the body like below.</p>
|
||||
<p>The scrollspy caches nav buttons and section coordinates for performance. If you need to update this cache (likely if you have dynamic content) just call this refresh method. If you used the data attribute to define your scrollspy, just call refresh on the body.</p>
|
||||
<pre class="prettyprint linenums">$('body').scrollspy('refresh')</pre>
|
||||
<h3>Demo</h3>
|
||||
<p>Look at the topbar navigation on this page.</p>
|
||||
<p>Checkout the the topbar navigation on this page.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user