### Install Bootstrap with Bower
Source: https://getbootstrap.com/docs/3.4/getting-started
Install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Bower.
```bash
bower install bootstrap
```
--------------------------------
### Install Grunt CLI and dependencies
Source: https://getbootstrap.com/docs/3.4/getting-started
Install the Grunt CLI globally, then install local dependencies from package.json in the Bootstrap root directory.
```bash
npm install -g grunt-cli
```
```bash
npm install
```
--------------------------------
### Install Bootstrap with Composer
Source: https://getbootstrap.com/docs/3.4/getting-started
Install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Composer.
```bash
composer require twbs/bootstrap
```
--------------------------------
### Basic Dropdown Example
Source: https://getbootstrap.com/docs/3.4/components
Wrap the dropdown trigger and menu within .dropdown (or an element with position: relative) and add the menu HTML. This is the basic dropdown example, made interactive with the dropdown JavaScript plugin.
```html
```
--------------------------------
### Basic panel example
Source: https://getbootstrap.com/docs/3.4/components
Basic panel structure using the .panel and .panel-body classes. By default, .panel applies basic border and padding to contain content.
```html
Basic panel example
```
--------------------------------
### Install Bootstrap with npm
Source: https://getbootstrap.com/docs/3.4/getting-started
Install Bootstrap using npm. The 'bootstrap' module loads all jQuery plugins onto the jQuery object and does not export anything.
```bash
npm install bootstrap@3
```
--------------------------------
### Basic button group example
Source: https://getbootstrap.com/docs/3.4/components
Wrap a series of buttons with .btn in .btn-group. Use role="group" and an aria-label for assistive technologies.
```html
```
--------------------------------
### Static modal example
Source: https://getbootstrap.com/docs/3.4/javascript
Static modal markup with header, body, and footer actions. Uses Bootstrap classes modal, modal-dialog, modal-content, modal-header, modal-body, and modal-footer.
```html
Modal title
One fine body…
```
--------------------------------
### Dropup Example
Source: https://getbootstrap.com/docs/3.4/components
Change the dropdown to expand upwards by adding .dropup to the parent element instead of .dropdown.
```html
```
--------------------------------
### Using and reassigning color variables
Source: https://getbootstrap.com/docs/3.4/css
Shows two ways to use the color variables: directly in a rule or by reassigning them to a more meaningful variable for your project. The example uses @brand-primary and @brand-info.
```less
// Use as-is
.masthead {
background-color: @brand-primary;
}
// Reassigned variables in Less
@alert-message-background: @brand-info;
.alert {
background-color: @alert-message-background;
}
```
--------------------------------
### Basic form with form-group and form-control
Source: https://getbootstrap.com/docs/3.4/css
Basic form example using .form-group for spacing and .form-control for inputs. Includes text, password, file, checkbox, and submit button. Note: do not mix form groups directly with input groups; nest the input group inside the form group instead.
```html
```
--------------------------------
### Rerun npm install after troubleshooting
Source: https://getbootstrap.com/docs/3.4/getting-started
Rerun npm install after deleting the /node_modules/ directory to resolve dependency or Grunt command issues.
```bash
npm install
```
--------------------------------
### Links in alerts with .alert-link
Source: https://getbootstrap.com/docs/3.4/components
Use the .alert-link utility class to provide matching colored links within any alert. This example shows the four contextual classes with alert-link anchors.
```html
```
--------------------------------
### Example usage of grid mixins with HTML
Source: https://getbootstrap.com/docs/3.4/css
Shows how to use the default mixins to create a two-column layout with a gap. The Less defines .wrapper, .content-main, and .content-secondary classes; the HTML uses those classes to structure the page. The layout uses .make-lg-column(8) and .make-lg-column(3) with an offset of 1.
```less
.wrapper {
.make-row();
}
.content-main {
.make-lg-column(8);
}
.content-secondary {
.make-lg-column(3);
.make-lg-column-offset(1);
}
```
```html
...
...
```
--------------------------------
### Show and hide content with .show and .hidden classes
Source: https://getbootstrap.com/docs/3.4/css
HTML example showing how to apply the .show and .hidden classes to force an element to be displayed or hidden, including for screen readers. These classes use !important to avoid specificity conflicts and are only available for block level toggling.
```html
...
...
```
--------------------------------
### Static tooltip directions (left, top, bottom)
Source: https://getbootstrap.com/docs/3.4/javascript
Static tooltip examples for left, top, and bottom placements. The fourth direction (right) is not shown in this snippet. Tooltips with zero-length titles are never displayed.
```html
```
--------------------------------
### Mobile, tablet, and desktop grid with .col-sm-*
Source: https://getbootstrap.com/docs/3.4/css
Build on the mobile/desktop example by adding tablet (.col-sm-*) classes for more dynamic layouts. The first row uses .col-xs-12 .col-sm-6 .col-md-8 and .col-xs-6 .col-md-4; the second row uses .col-xs-6 .col-sm-4 and includes an optional .clearfix .visible-xs-block to clear extra small columns when content heights differ.
```html
.col-xs-12 .col-sm-6 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4
.col-xs-6 .col-sm-4
```
--------------------------------
### Default thumbnail with linked image
Source: https://getbootstrap.com/docs/3.4/components
Default thumbnail example for linked images. Uses grid columns to create a responsive layout.
```html
...
```
--------------------------------
### Collapse with link and button
Source: https://getbootstrap.com/docs/3.4/javascript
Collapse example with a link using href and a button using data-target. Both require data-toggle="collapse". The collapse element uses .collapse to hide content, .collapsing during transitions, and .collapse.in to show.
```html
Link with href
...
```
--------------------------------
### Panel with table and no body
Source: https://getbootstrap.com/docs/3.4/components
Use this panel when you want the table to start immediately after the heading, without a panel body. The component moves from panel header to table without interruption.
```html
Panel heading
...
```
--------------------------------
### Dropdown Header Example
Source: https://getbootstrap.com/docs/3.4/components
Add a header to label sections of actions in a dropdown menu by using
.
```html
...
Dropdown header
...
```
--------------------------------
### Basic list group with .list-group and .list-group-item
Source: https://getbootstrap.com/docs/3.4/components
Basic list group using an unordered list with the .list-group and .list-group-item classes. Use as a starting point for more complex list groups.
```html
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
Porta ac consectetur ac
Vestibulum at eros
```
--------------------------------
### Dropdown Divider Example
Source: https://getbootstrap.com/docs/3.4/components
Add a divider to separate series of links in a dropdown menu using
.
```html
...
...
```
--------------------------------
### Panel with heading and panel-title
Source: https://getbootstrap.com/docs/3.4/components
Two panel examples: one with a plain .panel-heading and one with a .panel-title heading. The .panel-heading overrides font sizes of h1-h6, and links inside .panel-title are properly colored.
```html
Panel heading without title
Panel content
Panel title
Panel content
```
--------------------------------
### Mobile and desktop grid with .col-xs-* and .col-md-*
Source: https://getbootstrap.com/docs/3.4/css
Use extra small (.col-xs-*) and medium (.col-md-*) grid classes to control column stacking on mobile and desktop. The first row stacks columns on mobile (one full-width, one half-width), the second starts at 50% on mobile and bumps to 33.3% on desktop, and the third keeps columns always 50% wide.
```html
.col-xs-12 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6
.col-xs-6
```
--------------------------------
### Basic input group examples with add-ons
Source: https://getbootstrap.com/docs/3.4/components
Shows four input-group variations: add-on on the left, add-on on the right, add-ons on both sides, and a label with a left add-on. Multiple add-ons on a single side and multiple form-controls in one group are not supported.
```html
@
@example.com
$.00
https://example.com/users/
```
--------------------------------
### Basic alert examples with contextual classes
Source: https://getbootstrap.com/docs/3.4/components
Basic alert messages require a contextual class (success, info, warning, or danger) because alerts have no default class. The role="alert" attribute is included for accessibility.
```html
...
...
...
...
```
--------------------------------
### Bootstrap source code directory structure
Source: https://getbootstrap.com/docs/3.4/getting-started
Directory structure of the Bootstrap source code download. Includes source Less, JavaScript, fonts, the precompiled dist folder, and documentation with examples.
```text
bootstrap/
├── less/
├── js/
├── fonts/
├── dist/
│ ├── css/
│ ├── js/
│ └── fonts/
└── docs/
└── examples/
```
--------------------------------
### Media list markup
Source: https://getbootstrap.com/docs/3.4/components
Use this markup to place media objects inside a list, which is useful for comment threads or article lists. The example shows a single list item with a media-left image and a media-body containing a media-heading.
```html
Media heading
...
```
--------------------------------
### Bootstrap Grid Column Wrapping Example
Source: https://getbootstrap.com/docs/3.4/css
Shows how Bootstrap wraps extra columns to a new line when the total exceeds 12 columns. The 4-column div wraps as a unit because 9 + 4 = 13 > 12.
```html
.col-xs-9
.col-xs-4 Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.
.col-xs-6 Subsequent columns continue along the new line.
```
--------------------------------
### Button sizes with .btn-lg, .btn-sm, .btn-xs
Source: https://getbootstrap.com/docs/3.4/css
Use the size classes .btn-lg, .btn-sm, and .btn-xs on button elements to create large, small, and extra small buttons. The example shows primary and default button variants for each size.
```html
```
--------------------------------
### Bootstrap Accordion with panel-group and collapse
Source: https://getbootstrap.com/docs/3.4/javascript
Accordion example using Bootstrap's collapse plugin with the panel component. The first panel is expanded by default (class 'in'), while the others are collapsed. Each panel uses data-toggle="collapse" and data-parent="#accordion" to ensure only one panel opens at a time.
```html
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
```
--------------------------------
### Build and test docs assets with grunt docs
Source: https://getbootstrap.com/docs/3.4/getting-started
Builds and tests CSS, JavaScript, and other assets used for local documentation via bundle exec jekyll serve.
```bash
grunt docs
```
--------------------------------
### #gradient > .radial(#start; #end)
Source: https://getbootstrap.com/docs/3.4/css
Creates a radial background gradient from two colors.
```APIDOC
## #gradient > .radial(#start; #end)
### Description
Creates a radial background gradient from the start color to the end color.
### Method
Mixin
### Parameters
- **start** (color) - Required - The starting color of the gradient.
- **end** (color) - Required - The ending color of the gradient.
### Usage Example
```less
#gradient > .radial(#333; #000);
```
```
--------------------------------
### Build everything and run tests with grunt
Source: https://getbootstrap.com/docs/3.4/getting-started
Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator, and regenerates Customizer assets. Requires Jekyll and is usually only needed when hacking on Bootstrap itself.
```bash
grunt
```
--------------------------------
### $(selector).tooltip(options)
Source: https://getbootstrap.com/docs/3.4/javascript
Initializes tooltips on selected elements with configurable options.
```APIDOC
## [JS] $(selector).tooltip(options)
### Description
Initializes tooltips on selected elements. The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element.
### Method
JavaScript function call
### Endpoint
$(selector).tooltip(options)
### Parameters
#### Options
- **animation** (boolean) - Optional - Default: true - Apply a CSS fade transition to the tooltip.
- **container** (string | false) - Optional - Default: false - Appends the tooltip to a specific element. Example: `container: 'body'`. Useful to position the tooltip in the flow of the document near the triggering element.
- **delay** (number | object) - Optional - Default: 0 - Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type. If a number is supplied, delay is applied to both hide/show. Object structure: `delay: { "show": 500, "hide": 100 }`.
- **html** (boolean) - Optional - Default: false - Insert HTML into the tooltip. If false, jQuery's `text` method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
- **placement** (string | function) - Optional - Default: 'top' - How to position the tooltip - top | bottom | left | right | auto. When "auto" is specified, it will dynamically reorient the tooltip. When a function is used, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The `this` context is set to the tooltip instance.
- **selector** (string | false) - Optional - Default: false - If a selector is provided, tooltip objects will be delegated to the specified targets. Used to apply tooltips to dynamically added DOM elements.
- **template** (string) - Optional - Default: `'
'` - Base HTML to use when creating the tooltip. The tooltip's `title` will be injected into the `.tooltip-inner`. `.tooltip-arrow` will become the tooltip's arrow. The outermost wrapper element should have the `.tooltip` class.
### Request Example
```javascript
$('#example').tooltip(options)
```
### Response
No return value documented.
### Notes
- Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`.
- For security reasons, the `sanitize`, `sanitizeFn` and `whiteList` options cannot be supplied using data attributes.
- The tooltip plugin is opt-in; you must initialize it yourself.
- When using tooltips on elements within a `.btn-group` or `.input-group`, or on table-related elements, specify `container: 'body'` to avoid unwanted side effects.
- Invoking `$(...).tooltip('show')` when the target element is `display: none;` will cause the tooltip to be incorrectly positioned.
- Only add tooltips to keyboard-focusable elements for accessibility.
- To add a tooltip to a disabled element, wrap it in a `
` and apply the tooltip to that `
`.
```
--------------------------------
### #gradient > .horizontal(#start; #end)
Source: https://getbootstrap.com/docs/3.4/css
Creates a horizontal background gradient from two colors.
```APIDOC
## #gradient > .horizontal(#start; #end)
### Description
Creates a horizontal background gradient from the start color to the end color.
### Method
Mixin
### Parameters
- **start** (color) - Required - The starting color of the gradient.
- **end** (color) - Required - The ending color of the gradient.
### Usage Example
```less
#gradient > .horizontal(#333; #000);
```
```
--------------------------------
### #gradient > .vertical(#start; #end)
Source: https://getbootstrap.com/docs/3.4/css
Creates a vertical background gradient from two colors.
```APIDOC
## #gradient > .vertical(#start; #end)
### Description
Creates a vertical background gradient from the start color to the end color.
### Method
Mixin
### Parameters
- **start** (color) - Required - The starting color of the gradient.
- **end** (color) - Required - The ending color of the gradient.
### Usage Example
```less
#gradient > .vertical(#333; #000);
```
```
--------------------------------
### #gradient > .horizontal-three-colors(#start; #mid; #stop; #end)
Source: https://getbootstrap.com/docs/3.4/css
Creates a horizontal gradient with three colors.
```APIDOC
## #gradient > .horizontal-three-colors(#start; #mid; #stop; #end)
### Description
Creates a horizontal gradient with three colors, where the middle color stops at a specified percentage.
### Method
Mixin
### Parameters
- **start** (color) - Required - The starting color of the gradient.
- **mid** (color) - Required - The middle color of the gradient.
- **stop** (percentage) - Required - The color stop percentage for the middle color.
- **end** (color) - Required - The ending color of the gradient.
### Usage Example
```less
#gradient > .horizontal-three-colors(#777; #333; 25%; #000);
```
```
--------------------------------
### #gradient > .vertical-three-colors(#start; #mid; #stop; #end)
Source: https://getbootstrap.com/docs/3.4/css
Creates a vertical gradient with three colors.
```APIDOC
## #gradient > .vertical-three-colors(#start; #mid; #stop; #end)
### Description
Creates a vertical gradient with three colors, where the middle color stops at a specified percentage.
### Method
Mixin
### Parameters
- **start** (color) - Required - The starting color of the gradient.
- **mid** (color) - Required - The middle color of the gradient.
- **stop** (percentage) - Required - The color stop percentage for the middle color.
- **end** (color) - Required - The ending color of the gradient.
### Usage Example
```less
#gradient > .vertical-three-colors(#777; #333; 25%; #000);
```
```
--------------------------------
### .modal('show')
Source: https://getbootstrap.com/docs/3.4/javascript
Manually opens a modal.
```APIDOC
## [JavaScript] .modal('show')
### Description
Manually opens a modal. Returns to the caller before the modal has actually been shown (i.e. before the shown.bs.modal event occurs).
### Method
JavaScript
### Endpoint
$('#myModal').modal('show')
### Parameters
None
### Request Example
$('#myModal').modal('show')
### Response
#### Success Response
No return value documented.
```
--------------------------------
### #gradient > .directional(#start; #end; #angle)
Source: https://getbootstrap.com/docs/3.4/css
Creates a linear background gradient with a specified angle.
```APIDOC
## #gradient > .directional(#start; #end; #angle)
### Description
Creates a linear background gradient with a specified angle.
### Method
Mixin
### Parameters
- **start** (color) - Required - The starting color of the gradient.
- **end** (color) - Required - The ending color of the gradient.
- **angle** (deg) - Required - The angle of the gradient.
### Usage Example
```less
#gradient > .directional(#333; #000; 45deg);
```
```
--------------------------------
### Sizing helpers: .size() and .square()
Source: https://getbootstrap.com/docs/3.4/css
Set dimensions with .size() or create a square with .square(). The .square() mixin calls .size() with equal values.
```less
// Mixins
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}
// Usage
.image { .size(400px; 300px); }
.avatar { .square(48px); }
```
--------------------------------
### Event: show.bs.modal
Source: https://getbootstrap.com/docs/3.4/javascript
Infinitive event triggered at the start of a modal show action. Provides preventDefault functionality to stop the action.
```APIDOC
## Event: show.bs.modal
### Description
Triggered at the start of the modal show action. Provides preventDefault functionality to stop the modal from being shown.
### Event Name
`show.bs.modal`
### Usage
javascript
$('#myModal').on('show.bs.modal', function (e) {
if (!data) return e.preventDefault() // stops modal from being shown
})
### Parameters
- **e** (Event) - The event object. Calling `e.preventDefault()` stops the modal from being shown.
### Notes
- All infinitive events provide `preventDefault` functionality.
- Events are namespaced with `.bs.modal`.
```
--------------------------------
### Default blockquote
Source: https://getbootstrap.com/docs/3.4/css
Wrap any HTML inside a
element to create a default blockquote. The example uses a
for the quoted text.
```html
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
```
--------------------------------
### Initialize modal with options
Source: https://getbootstrap.com/docs/3.4/javascript
Activates content as a modal with an optional options object. Here, keyboard is set to false to disable closing on escape key.
```javascript
$('#myModal').modal({
keyboard: false
})
```
--------------------------------
### Image replacement with .text-hide class
Source: https://getbootstrap.com/docs/3.4/css
HTML example of using the .text-hide class to replace an element's text content with a background image.
```html
Custom heading
```
--------------------------------
### Stacked progress bars with contextual classes
Source: https://getbootstrap.com/docs/3.4/components
Place multiple bars into the same `.progress` to stack them. Each bar uses a contextual class (`progress-bar-success`, `progress-bar-warning`, `progress-bar-danger`) and a width style.
```html
35% Complete (success)
20% Complete (warning)
10% Complete (danger)
```
--------------------------------
### Button loading and reset methods
Source: https://getbootstrap.com/docs/3.4/javascript
Shows how to use the loading and reset methods on a button via a click event. The loading method is called first, then after business logic, the reset method is called.
```html
```
--------------------------------
### Bootstrap carousel with interval option
Source: https://getbootstrap.com/docs/3.4/javascript
Initializes a Bootstrap carousel with an options object, here setting the interval to 2000 milliseconds. The carousel starts cycling through items.
```javascript
$('.carousel').carousel({
interval: 2000
})
```
--------------------------------
### show.bs.collapse
Source: https://getbootstrap.com/docs/3.4/javascript
Event that fires immediately when the show instance method is called.
```APIDOC
## [Event] show.bs.collapse
### Description
This event fires immediately when the `show` instance method is called.
### Event Type
show.bs.collapse
### Usage
Attach an event listener to the collapsible element.
### Example
```javascript
$('#myCollapsible').on('show.bs.collapse', function () {
// do something…
})
```
```
--------------------------------
### Use .navbar-text for navbar text
Source: https://getbootstrap.com/docs/3.4/components
Wrap text in an element with the .navbar-text class, typically on a
tag, to get proper leading and color in the navbar.
```html
Signed in as Mark Otto
```
--------------------------------
### Block level buttons with .btn-block
Source: https://getbootstrap.com/docs/3.4/css
Add .btn-block to a button to make it span the full width of its parent. The example shows primary and default block-level buttons.
```html
```
--------------------------------
### $().button('loading')
Source: https://getbootstrap.com/docs/3.4/javascript
Sets a button to loading state.
```APIDOC
## `$().button('loading')`
### Description
Sets a button to loading state. This feature is deprecated since v3.3.5 and has been removed in v4.
### Method
`$().button('loading')`
### Usage
```
$('#myButton').button('loading')
```
```
--------------------------------
### Bootstrap 3 Basic HTML Template
Source: https://getbootstrap.com/docs/3.4/getting-started
Minimal Bootstrap 3.4.1 HTML document with required meta tags, CDN links for CSS and JavaScript, jQuery 1.12.4, and HTML5 shim/Respond.js for IE8 support. Includes a warning that Respond.js does not work when viewing via file://.
```html
Bootstrap 101 Template
Hello, world!
```
--------------------------------
### Horizontal description list with .dl-horizontal
Source: https://getbootstrap.com/docs/3.4/css
Makes terms and descriptions in a
line up side-by-side. Starts stacked like default
s and expands when the navbar expands.
```html
...
...
```
--------------------------------
### Remove gutters with .row-no-gutters
Source: https://getbootstrap.com/docs/3.4/css
Use the `.row-no-gutters` class on a row to remove gutters from its columns. The example shows three rows with different column combinations, all using the class.
```html
.col-xs-12 .col-md-8
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6 .col-md-4
.col-xs-6
.col-xs-6
```
--------------------------------
### Affix Methods
Source: https://getbootstrap.com/docs/3.4/javascript
Methods for the Bootstrap affix plugin to activate and recalculate affixed content.
```APIDOC
## .affix(options)
### Description
Activates your content as affixed content. Accepts an optional options object.
### Method
.affix(options)
### Parameters
- **options** (object) - Optional - An object containing configuration options.
### Request Example
$('#myAffix').affix({
offset: 15
})
### Response
No return value.
```
```APIDOC
## .affix('checkPosition')
### Description
Recalculates the state of the affix based on the dimensions, position, and scroll position of the relevant elements. The `.affix`, `.affix-top`, and `.affix-bottom` classes are added to or removed from the affixed content according to the new state. This method needs to be called whenever the dimensions of the affixed content or the target element are changed, to ensure correct positioning of the affixed content.
### Method
.affix('checkPosition')
### Parameters
None
### Request Example
$('#myAffix').affix('checkPosition')
### Response
No return value.
```
--------------------------------
### Override offsets with .col-*-offset-0
Source: https://getbootstrap.com/docs/3.4/css
Override offsets from lower grid tiers with `.col-*-offset-0` classes. This example uses `.col-xs-offset-3` and `.col-sm-offset-0` to reset the offset at the small breakpoint.
```html
```
--------------------------------
### .modal(options)
Source: https://getbootstrap.com/docs/3.4/javascript
Activates your content as a modal with optional options.
```APIDOC
## [JavaScript] .modal(options)
### Description
Activates your content as a modal. Accepts an optional options object.
### Method
JavaScript
### Endpoint
$('#myModal').modal(options)
### Parameters
#### Options
- **backdrop** (boolean or string 'static') - Optional - Includes a modal-backdrop element. Alternatively, specify 'static' for a backdrop which doesn't close the modal on click.
- **keyboard** (boolean) - Optional - Closes the modal when escape key is pressed.
- **show** (boolean) - Optional - Shows the modal when initialized.
- **remote** (path) - Optional - Deprecated since v3.3.0 and removed in v4. If a remote URL is provided, content will be loaded one time via jQuery's load method and injected into the .modal-content div.
### Request Example
$('#myModal').modal({
keyboard: false
})
### Response
#### Success Response
No return value documented.
```
--------------------------------
### Use custom sanitizeFn with DOMPurify
Source: https://getbootstrap.com/docs/3.4/javascript
Bypass Bootstrap's built-in sanitizer by providing a custom sanitizeFn, for example using DOMPurify. This is useful when you prefer a dedicated sanitization library.
```javascript
$('#yourTooltip').tooltip({
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
}
})
```