Bootstrap Tutorial - Click to show button icon








The following code shows how to click to show button icon.

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">
<script type='text/javascript'
  src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript'>
window.onload=function(){<!--  w w  w  . j  ava 2s  .c  om-->
    $(function() {
        $('.btn').click(function() {
            $(this).find('span').show();
        });
    });
}
</script>
</head>
<body style='margin:30px'>
    <div class="btn">
        <span style="display: none"><i class="icon-trash"></i></span> Button
    </div>
    <br />
</script>
</body>
</html>

Click to view the demo