Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document popover focus #12688

Merged
merged 4 commits into from
Mar 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/css/bootstrap-theme.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.css.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion docs/assets/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@
})

// popover demo
$('[data-toggle=popover]').popover()
$('.bs-docs-popover').popover()

// Popover dismiss on next click
$('.bs-docs-popover-dismiss').popover({
trigger: 'focus'
})

// button state demo
$('#loading-example-btn')
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/docs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap-theme.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.css.map

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion docs/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,8 @@ <h3>Events</h3>
{% endhighlight %}
</div>



<!-- Popovers
================================================== -->
<div class="bs-docs-section">
Expand Down Expand Up @@ -1167,8 +1169,11 @@ <h3 class="popover-title">Popover left</h3>

<h3>Live demo</h3>
<div class="bs-example" style="padding-bottom: 24px;">
<a href="#" class="btn btn-lg btn-danger" data-toggle="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?" role="button">Click to toggle popover</a>
<button type="button" class="btn btn-lg btn-danger bs-docs-popover" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
</div>
{% highlight html %}
<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
{% endhighlight %}

<h4>Four directions</h4>
<div class="bs-example tooltip-demo">
Expand Down Expand Up @@ -1204,6 +1209,20 @@ <h4>Four directions</h4>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on right
</button>
{% endhighlight %}

<h4>Dismiss on next click</h4>
<p>Use the <code>focus</code> trigger to dismiss popovers on their next click.</p>
<div class="bs-example" style="padding-bottom: 24px;">
<button type="button" class="btn btn-lg btn-danger bs-docs-popover-dismiss" data-toggle="popover" title="Dimissmisable popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissable popover</button>
</div>
{% highlight html %}
<button type="button" class="btn btn-lg btn-danger popover-dismiss" data-toggle="popover" title="Dimissmisable popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissable popover</button>
{% endhighlight %}
{% highlight js %}
$('.popover-dismiss').popover({
trigger: 'focus'
})
{% endhighlight %}

<div class="bs-callout bs-callout-warning">
Expand Down