Bootstrap Event: Modal is About to be Hidden

Kristi Castro
Updated on 18-Jun-2020 14:09:08

125 Views

The hide.bs.modal event in Bootstrap fires when the modal is about to be hidden.Firstly, hide the Bootstrap modal on button click −$("#button1").click(function(){   $("#newModal").modal("hide"); });Now, use the hide.bs.modal class and generate the alert when the modal is about to hide on button click −$("#newModal").on('hide.bs.modal', function () {   alert('The modal is about to be hidden.'); });Let us see an example stating the usage of hide.bs.modal event −ExampleLive Demo       Bootstrap Example                             #button1 {       ... Read More

Display Flex Items Vertically in Bootstrap 4

Kristi Castro
Updated on 18-Jun-2020 14:06:53

292 Views

To display flex items vertically, use the flex-column class in Bootstrap 4 −Now set the flex-items in it −   One   Two   Three   Four   Five Let us see an example to learn how to learn how to display flex-column class −   ExampleLive Demo       Bootstrap Example                             Example of Flex Column     Stating the usage of flex column class:           One       Two       Three       Four       Five      

Bootstrap 4 Flex Column Class

Ricky Barnes
Updated on 18-Jun-2020 14:02:51

455 Views

Use the .flex-*- column class in Bootstrap to show flex items vertically on different screen sizes:Set it vertically on small, medium, large, etc screen size. Let us see it on small and medium screen size:Small Screen SizeFlex on different screen size (Small)   One   Two   Three Medium Screen SizeFlex on different screen size (Medium)   One   Two   Three The following is an example implementing what I have shown above the usage of flex-*-column −ExampleLive Demo       Bootstrap Example                 ... Read More

Border Top 0 Class in Bootstrap 4

Ricky Barnes
Updated on 18-Jun-2020 14:00:57

327 Views

Use the border-top-0 class in Bootstrap 4 to remove the top border.Set the border-top-0 class −   Rectangle is missing the TOP border. Let us see an example to implement the border-top-0 class −ExampleLive Demo       Bootstrap Example                             .mystyle {       width: 350px;       height: 170px;       margin: 10px;     }             Heading Two           Rectangle is missing the TOP border.      

Set Orange Border on an Element in Bootstrap to Indicate Danger

Ricky Barnes
Updated on 18-Jun-2020 13:57:46

220 Views

To set orange border to an element, use the border-warning class −   Danger (Orange border) Set the style for the element − .mystyle {   width: 200px;   height: 100px;   margin: 10px; } Let us see an example to implement the border-warning class in Bootstrap −ExampleLive Demo       Bootstrap Example                             .mystyle {       width: 200px;       height: 100px;       margin: 10px;     }             The following are two Rectangles:     Danger (Orange border)  

Set a White Border to an Element in Bootstrap

Ricky Barnes
Updated on 18-Jun-2020 13:56:01

189 Views

Use the border-white class in Bootstrap 4 to set white border to an element.   This has white border The test class above styles the element as shown below − .test {   width: 120px;   height: 100px;   margin: 10px;   background: blue; } Let us see an example to implement the border-white class in Bootstrap −ExampleLive Demo       Bootstrap Example                             .test {       width: 120px;       height: 100px;       margin: 10px;       background: blue;     }               Two Rectangles     This has white border     This has orange border  

Bootstrap 4 Border 0 Class

Ricky Barnes
Updated on 18-Jun-2020 13:53:39

361 Views

Use the border-0 class in Bootstrap to eliminate all borders from an element as shown below −   No border We have also set CSS style above −.mystyle {   width: 120px;   height: 100px;   margin: 10px;   background: gray; }You can try to run the following code to implement the border-0 class −ExmapleLive Demo       Bootstrap Example                               .mystyle {       width: 120px;       height: 100px;       margin: 10px;       background: gray;     }             Two Rectangles     orange border     No border  

Bootstrap 4 Button btn-outline-dark Class

Ricky Barnes
Updated on 18-Jun-2020 13:52:00

376 Views

Use the .btn-outline-dark class in Bootstrap to set dark outline on a button.The following is an example of a button with dark outline −Set the above outline to the button, using the btn-outline-dark class as shown below −   Submit You can try to run the following code to implement the btn-outline-dark class −ExampleLive Demo       Bootstrap Example                               Bootstrap 4     Learning  btn-outline-dark class usage:     Submit  

Ternary Operator X ? Y in C++

Abhinaya
Updated on 18-Jun-2020 13:45:52

368 Views

The conditional operator (? :) is a ternary operator (it takes three operands). The conditional operator works as follows −The first operand is implicitly converted to bool. It is evaluated and all side effects are completed before continuing.If the first operand evaluates to true (1), the second operand is evaluated.If the first operand evaluates to false (0), the third operand is evaluated.The result of the conditional operator is the result of whichever operand is evaluated — the second or the third. Only one of the last two operands is evaluated in a conditional expression. The evaluation of the conditional operator ... Read More

Can We Override Private Methods in Java

Samual Sam
Updated on 18-Jun-2020 13:35:44

1K+ Views

Ideally No. But, using the tricky code, a subclass can override a private method as well. See the example below −ExampleLive Democlass A {    private void display() {       System.out.println("A.display");    }     public void callDisplay() {       System.out.println("A.callDisplay");       display();    } } class B extends A {    private void display() {       System.out.println("B.display");    }     public void callDisplay() {       System.out.println("B.callDisplay");       display();    }   } public class Tester {    public static void main(String[] args) {   ... Read More

Advertisements