Web Development Articles

Page 724 of 801

Activate the content as a Bootstrap modal

David Meador
David Meador
Updated on 11-Mar-2026 587 Views

If you want to set content as a Bootstrap modal, then use the .modal(options) method.On button click, the modal generates as in the following script.$(document).ready(function(){   $("#button1").click(function(){     $("#newModal1").modal({backdrop: true});   }); });Above, I have set options as “backdrop:true”. Another option, we can set is “backdrop: true” −backdrop: true =  Clicking outside the modal, close it.backdrop: false = Clicking outside the modal, won’t close it.You can try to run the following code to implement the modal(“options”) class −Example       Bootstrap Example                     ...

Read More

Create a Flexbox container with Bootstrap 4

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 330 Views

Use the d-flex class in Bootstrap to create a flexbox container.Here, I have set two flex items −     One   Two Above, I have used the d-flex class to set the container. The container has both the flex items styled using the bg-primary and bg-warning classes respectively.Let us see the complete example −Example       Bootstrap Example                             Understanding Flex             One       Two      

Read More

Stretch gathered items on different screens in Bootstrap 4

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 173 Views

Use the .align-content-*-stretch in Bootstrap 4 to stretch gathered items on different screens.To stretch items on different screens −Stretch items on Small Screen   Work 1   Work 2   Work 3   Work 4   Work 5   Work 6 Stretch items on Medium Screen   Work 1   Work 2   Work 3   Work 4   Work 5   Work 6 Stretch items on Large Screen   Work 1   Work 2   Work 3   Work 4   Work 5   Work 6 Let us see an example to stretch gathered items on different screen size ...

Read More

Set a green border to an element in Bootstrap to indicate success

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 283 Views

To set green border, use the border-success class in Bootstrap 4.The below element will have green border since we have set the class of the as border-success class −   Green border You can try to run the following code to set green border to an element indicating success −Example       Bootstrap Example                              .mystyle {        width: 150px;        height: 150px;        margin: 10px;      }       Rectangle   Green border

Read More

Bootstrap 4 Button .btn-outline-warning class

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 340 Views

To set an outline on a button that indicates warning, you need to use the btn-outline class in Bootstrap.For my class, I have taken the below button −   Warning (Errors) The button above has the class btn-outline-warning that allow us to add an orange outline stating warning action −You can try to run the following code to implement the btn-outline-warning class −Example       Bootstrap Example                         Warning   The following are the warning messages:       semi-colon (;) missing     infinite loop     For more warning messages:   Warning (Errors)

Read More

Set positive action to the Bootstrap 4 card

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 201 Views

To set positive/ success action to a card in Bootstrap, use the card-success class.Here, I have set the card-success class like we set class on any element like .   Deal! In the same way, set other success messages −   Task complete! Let us implement success action on a Bootstrap 4 card −Example       Bootstrap Example                         Success Messages       Deal!         Cleared the 2nd  round!         Victory!         Task complete!    

Read More

card-title class in Bootstrap 4

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 387 Views

Use the card-title class in Bootstrap 4 to set title for the card like the following example −The card title set above used the card-title class inside the card-body class. In addition, I have used the card-text class to set text inside the Bootstrap card as shown in the below give code snippet −   Company Locations   Singapore   Malaysia   Australia You can try to run the following code to implement the card-title class −Example       Bootstrap Example                         Location             Company Locations       Singapore       Malaysia       Australia      

Read More

hide.bs.popover Bootstrap event

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 237 Views

The hide.bs.popover event fires when the popover is about to be hidden.Add a click button to hide the popver using the popver(“hide”) method −$(".btn-default").click(function(){   $("[data-toggle='popover']").popover('hide'); });After clicking the button, fire the popover event and generate an alert using the hide.bs.popver event in Bootstrap −$("[data-toggle='popover']").on(hide.bs.popover', function(){   alert('Popover is about to be hidden!'); });You can try to run the following code to implement the hide.bs.popover event −Example       Bootstrap Example                         Awards     ...

Read More

Bootstrap .tab("show") method

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 5K+ Views

Use the Bootstrap .tab(“show”) method to display the tabs.The following are the nav tabs −   Home   PHP   C#.NET   Ruby   HTML5 Using a script and the tab(“show”) method, the above tabs are displayed as in the following code snippet −$(document).ready(function(){   $(".nav-tabs a").click(function(){     $(this).tab('show');  }); });Let us see an example to learn how to display tabs using the tab(“show”) method −Example       Bootstrap Example                         Web Dev   ...

Read More

show.bs.tab event in Bootstrap

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 5K+ Views

The show.bs.event fires when the tab is about to be displayed.Display the tab using the nav-tabs class −   Home   Java   CSS   Bootstrap   jQuery After that, you need to use the show.bs.tab class to generate an alert after the tab is clicked, but just before it is displayed −$('.nav-tabs a').on('show.bs.tab', function(){   alert('New tab will be visible now!'); });You can try to run the following code to implement the show.bs.tab event −Example       Bootstrap Example                       ...

Read More
Showing 7231–7240 of 8,010 articles
« Prev 1 722 723 724 725 726 801 Next »
Advertisements