1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-02 01:42:36 +02:00

Cosmetic changes in snippets.

This commit is contained in:
XhmikosR
2019-02-10 22:25:51 +02:00
parent 7a9a8db7b1
commit bbf8b768ef
10 changed files with 16 additions and 15 deletions

View File

@@ -100,7 +100,7 @@ Note that closing an alert will remove it from the DOM.
| `$().alert('close')` | Closes an alert by removing it from the DOM. If the `.fade` and `.show` classes are present on the element, the alert will fade out before it is removed. | | `$().alert('close')` | Closes an alert by removing it from the DOM. If the `.fade` and `.show` classes are present on the element, the alert will fade out before it is removed. |
| `$().alert('dispose')` | Destroys an element's alert. | | `$().alert('dispose')` | Destroys an element's alert. |
{% highlight js %}$(".alert").alert('close'){% endhighlight %} {% highlight js %}$('.alert').alert('close'){% endhighlight %}
### Events ### Events
@@ -113,6 +113,6 @@ Bootstrap's alert plugin exposes a few events for hooking into alert functionali
{% highlight js %} {% highlight js %}
$('#myAlert').on('closed.bs.alert', function () { $('#myAlert').on('closed.bs.alert', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -355,7 +355,7 @@ All carousel events are fired at the carousel itself (i.e. at the `<div class="c
{% highlight js %} {% highlight js %}
$('#myCarousel').on('slide.bs.carousel', function () { $('#myCarousel').on('slide.bs.carousel', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -246,6 +246,6 @@ Bootstrap's collapse class exposes a few events for hooking into collapse functi
{% highlight js %} {% highlight js %}
$('#myCollapsible').on('hidden.bs.collapse', function () { $('#myCollapsible').on('hidden.bs.collapse', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -904,6 +904,6 @@ All dropdown events are fired at the `.dropdown-menu`'s parent element and have
{% highlight js %} {% highlight js %}
$('#myDropdown').on('show.bs.dropdown', function () { $('#myDropdown').on('show.bs.dropdown', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -115,7 +115,7 @@ Set heights using classes like `.form-control-lg` and `.form-control-sm`.
Add the `readonly` boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor. Add the `readonly` boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.
{% capture example %} {% capture example %}
<input class="form-control" type="text" placeholder="Readonly input here" readonly> <input class="form-control" type="text" placeholder="Readonly input here..." readonly>
{% endcapture %} {% endcapture %}
{% include example.html content=example %} {% include example.html content=example %}

View File

@@ -351,6 +351,6 @@ Updates the position of an element's popover.
{% highlight js %} {% highlight js %}
$('#myPopover').on('hidden.bs.popover', function () { $('#myPopover').on('hidden.bs.popover', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -340,6 +340,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
{% highlight js %} {% highlight js %}
$('[data-spy="scroll"]').on('activate.bs.scrollspy', function () { $('[data-spy="scroll"]').on('activate.bs.scrollspy', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -339,6 +339,6 @@ Hides an element's toast. Your toast will remain on the DOM but won't show anymo
{% highlight js %} {% highlight js %}
$('#myToast').on('hidden.bs.toast', function () { $('#myToast').on('hidden.bs.toast', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -356,6 +356,6 @@ Updates the position of an element's tooltip.
{% highlight js %} {% highlight js %}
$('#myTooltip').on('hidden.bs.tooltip', function () { $('#myTooltip').on('hidden.bs.tooltip', function () {
// do something // do something...
}) })
{% endhighlight %} {% endhighlight %}

View File

@@ -100,7 +100,8 @@ $('#myCarousel').carousel('2') // !! Will be ignored, as the transition to the s
You can change the default settings for a plugin by modifying the plugin's `Constructor.Default` object: You can change the default settings for a plugin by modifying the plugin's `Constructor.Default` object:
{% highlight js %} {% highlight js %}
$.fn.modal.Constructor.Default.keyboard = false // changes default for the modal plugin's `keyboard` option to false // changes default for the modal plugin's `keyboard` option to false
$.fn.modal.Constructor.Default.keyboard = false
{% endhighlight %} {% endhighlight %}
## No conflict ## No conflict