<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> </div> </nav> <div class="col-md-6 well"> <hr style="border-top:1px dottec #ccc;"/> <div class="col-md-8"> </div> </div> </body> </html>
$(document).ready(function(){ $('#display').on('click', function(){ var message = $('<div style="width:100%; height:200px;" class="alert alert-info"><center style="margin-top:50px;"><h2>Welcome to SOURCECODESTER</h2></center></div>'); $('#result').html(message); $(this).removeAttr('id'); setTimeout(function(){ message.fadeOut(); $('#display').attr('id', 'display'); }, 5000) }); })