From ab73ff182820954a644a5648f11f51d0704f9390 Mon Sep 17 00:00:00 2001 From: Rakhat Jabagin Date: Mon, 2 Dec 2013 10:39:53 +0600 Subject: [PATCH] replace double quotation marks with single in code examples --- javascript.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/javascript.html b/javascript.html index f0be59da8e..dcc2a1e84c 100644 --- a/javascript.html +++ b/javascript.html @@ -43,14 +43,14 @@ $(document).off('.alert.data-api')

Programmatic API

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

{% highlight js %} -$(".btn.danger").button("toggle").addClass("fat") +$('.btn.danger').button('toggle').addClass('fat') {% endhighlight %}

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

{% highlight js %} -$("#myModal").modal() // initialized with defaults -$("#myModal").modal({ keyboard: false }) // initialized with no keyboard -$("#myModal").modal('show') // initializes and invokes show immediately

+$('#myModal').modal() // initialized with defaults +$('#myModal').modal({ keyboard: false }) // initialized with no keyboard +$('#myModal').modal('show') // initializes and invokes show immediately

{% endhighlight %}

Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

@@ -1600,7 +1600,7 @@ $('.btn').button()

Via JavaScript

Enable manually with:

{% highlight js %} -$(".collapse").collapse() +$('.collapse').collapse() {% endhighlight %}

Options

-- 2.47.2