Bootstrap 4 JS Button

Button CSS Classes

For a tutorial about Buttons, read our Bootstrap Buttons Tutorial.
The classes below can be used to style any <a>, <button>, or <input> element:

ClassDescriptionExample
.btnAdds basic styling to any buttonTry it
.btn-blockMakes a block-level button (spans the full width of the parent element)Try it
.btn-dangerIndicates a dangerous or potentially negative actionTry it
.btn-darkDark grey buttonTry it
.btn-defaultIndicates a default/standard buttonTry it
.btn-infoContextual button for informational alert messagesTry it
.btn-lgMakes a large buttonTry it
.btn-lightLight grey buttonTry it
.btn-linkMakes a button look like a link (will still have button behavior)Try it
.btn-outline-*Creates an outlined/bordered button. Use any of the contextual classes as * (btn-outline-primary, btn-outline-success, etc)Try it
.btn-primaryProvides extra visual weight and identifies the primary action in a set of buttonsTry it
.btn-smMakes a small buttonTry it
.btn-successIndicates a successful or positive actionTry it
.btn-secondaryIndicates a "less" important actionTry it
.btn-toolbarCombine sets of button groups into button toolbars for more complex componentsTry it
.btn-warningIndicates caution should be taken with this actionTry it
.activeMakes the button appear pressedTry it
.disabledMakes the button disabledTry it

Via JavaScript

Enable manually with:
$('.btn').button();

Button Options

None

Button Methods

The following table lists all available button methods.
Note: Methods can also be passed via data attributes; append the method name to data-, as in data-toggle or data-dispose.
MethodDescriptionTry it
.button("toggle")Makes the button look pressedTry it
.button("dispose")Destroys an element's button


Credit: www.w3schools.com
Bootstrap 4 JS Button Bootstrap 4 JS Button Reviewed by webmission on 11:37 Rating: 5

No comments:

Powered by Blogger.