These are chat archives for twbs/bootstrap

8th
Feb 2018
AJEET SINGH
@imajeet
Feb 08 01:22
Hi everyone..
Urunboev
@Urunboev
Feb 08 10:37
Hello
mayankgaur8
@mayankgaur8
Feb 08 14:08
hello i am new to bootstrap
i want to make allert on button click
Mark
@qualityplatforms
Feb 08 14:09
This isn't bootstrap but jQuery
mayankgaur8
@mayankgaur8
Feb 08 14:09
yha it will also be fine
Mark
@qualityplatforms
Feb 08 14:10
So like this
$("#button").click(function() {alert('button clicked')});
mayankgaur8
@mayankgaur8
Feb 08 14:10
no

<!DOCTYPE html>

<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){
$('#btnSubmit').click(function(){
$('#myAlert').show('fade');
});

$(#linkClose).click(function(){
$('#myAlert').hide('fade');
});
</script>
<body>

<div class="container">
<h2>Button Tags</h2>

<button id="btnSubmit" class="btn btn-primary">Button</button>
<br/><br/>
<div id="myAlert" class="alert alert-danger collapse">
<!-- <a id="linkClose" href="#" class="close" data-dismiss="alert">×</a> -->
<a id="linkClose" href="#" class="close">×</a>
<strong>Error!</strong>Their is problem in submitting your Form
</div>

</div>

</body>
</html>

i have made sample code
but on button click it's not giving alert
any idea
Mark
@qualityplatforms
Feb 08 14:15
Please upload to jsfiddle
matrixbot
@matrixbot
Feb 08 15:54
heyJoe Hi guys!
heyJoe Need some help :
How can I highlight h2 with scrollspy?
Like as menu highlighted when element is near.
utuniyal12
@utuniyal12
Feb 08 19:10
im having trouble using the thumbnail in bootstrap
the image spans out of the thumbnail idk why
can someone help me