I am new to CSS and I am using Bootstrap and I want to use forms in 2 ways: With or without borders around the form fields. How can I achieve that best? Here is an example of a
In Bootstrap 4, you can add border-0
class to your element to remove its border.
Other classes that you can use - Bootstrap 4 Borders
/* remove all borders */
/* remove top border */
/* remove border on the right */
/* remove bottom border */
/* remove border on the left */
And here is a working example for what you asked:
$("#myButton").click(function() {
$("#myInput").toggleClass('border-0')
});