Bootstrap Interview Questions and Answers (31) - Page 2

Show that how do we close multiple alerts at a time in Bootstraps ?

In Bootstraps if you want to close all the alert messages at once.
Here is the example :
We should write Java script code and HTML 5 code.

Javascript:
<script type="text/javascript">

$(document).ready(function ()
{
$(".close").click(function ()
{
$("#Danger").alert('close');
});
});
</script>


HTML :
 <div id="Danger">

<div class="alert alert-danger">
<a href="#" class="close">&times;</a>
<strong>Error!</strong> There was a problem around your network
</div>
<div class="alert alert-danger">
<a href="#" class="close">&times;</a>
<strong>Error!</strong> There was a problem building solution.
</div>
</div>


Run the code combination in the browser for out put
Write a Script function Alert events from Java script in Bootstraps ?

Here is a simple code for alert events in java script .
Javascript :
<script type="text/javascript">

$(document).ready(function () {
$("#Success").on('close.bs.alert', function () {
alert("This Alert box is being closed.");
});
});
</script>


HTML:
<div class="alert alert-danger" id="Success">

<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Error!</strong> There was a problem around your network.
</div>

Run this code combination in browser for the output
Show an example with alert using well class in Bootstrap ?

<div class="well">

<a href="#" class="close" data-dismiss="alert">&times;</a>
<strong>Success!</strong> Your Post was successfully shared.
</div>

The above code is showing that alert well class in Bootstrap.
The Bootstrap grid system is based on how many columns?

NOTE: This is objective type question, Please click question title for correct answer.
Which button class is used to create a large button?

NOTE: This is objective type question, Please click question title for correct answer.
Which class is used to create a button group?

NOTE: This is objective type question, Please click question title for correct answer.
How can you insert a search icon?

NOTE: This is objective type question, Please click question title for correct answer.
What are glyphicons?

Glyphicons are icon fonts which you can use in your web projects. Glyphicons Halflings are not free and require licensing, however their creator has made them available for Bootstrap projects free of cost.
How do you use Glyphicons?

To use the icons, simply use the following code just about anywhere in your code. Leave a space between the icon and text for proper padding.

Example :
<span class="glyphicon glyphicon-search"></span>

Which class is used to display black navigation bar

NOTE: This is objective type question, Please click question title for correct answer.
What is Bootstrap and why it is used?

NOTE: This is objective type question, Please click question title for correct answer.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories