If you are using Bootstrap UI framework in your project and want to disable a button element, you can simply do it by adding attribute disabled="true",
Example:
<button id="myButton" type="button" class="btn btn-primary" disabled="true">Primary</button>
If you want to disable the button programmatically via JavaScript, you can do
document.getElementById("myButton").disabled = true;
If you want to achieve this using JQuery you can try the below code,
$('myButton').prop('disabled', true);
More Posts related to Bootstrap,
- [Solved] Bootstrap tooltip not working
- Create Bootstrap carousel slider with Text
- Bootstrap tooltip not working
- How to disable button in Bootstrap
- Vertical align two div's in Bootstrap [HTML CSS]
- Bootstrap Button Colors Classes
- How to Change Bootstrap Carousel Slide Speed
- Right Align Text in Bootstrap framework
- How to add hint text in bootstrap input text field and text area
- Simple Login Page using Bootstrap
- Make Bootstrap Button look like a link
- Align left align text in Bootstrap
- Bootstrap Nav Menu Dropdown on hover
- Rounded Images in Bootstrap framework
- What is Bootstrap Jumbotron and how to use it
More Posts:
- [Solution] Alpine Docker apt-get: not found - Docker
- Take Screenshot on Mac OS X (Keyboard Shortcuts) - Mac-OS-X
- How to change Ping TTL value on macOS - MacOS
- How to install AWS CLI on Ubuntu - AWS
- How to reload Zsh .zshrc Profile - zsh
- How to Get Substring from a String in Python using string slicing - Python
- JavaScript: Count Words in a String - JavaScript
- Calculate Area of a Rectangle - C-Program