Results 1 to 1 of 1

Thread: Show a modal window when page is load

  1. #1
    Junior Member
    Join Date
    Jun 2016
    Posts
    1

    Show a modal window when page is load

    I have this code, Its work, but I want to show a modal windows automatically when the page is loading.

    HTML Code:
    <!doctype html>
    <html lang="es">
    <head>
      <meta charset="utf-8">
      <title>Test </title>
      <link rel="stylesheet" href="css/jquery-ui.min.css">
      <link rel="stylesheet" href="css/bootstrap.min.css">
    
      <script src="js/jquery.js"></script>
      <script src="js/jquery-ui.min.js"></script>
      <script src="js/bootstrap.min.js"></script>
    
    </head>
    
    <body>
    	<div class="container">
    		<a href="#ventana1" class="btn btn-primary btn-lg" data-toggle="modal">Botón 1</a>
    
    		<div class="modal fade" id="ventana1">
    			<div class="modal-dialog">
    				<div class="modal-content">
    					<div class="modal-header">
    						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    						<h4 class="modal-title">Encabezado Ventana 1</h4>
    					</div>
    
    					<div class="modal-body">
    						<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Neque doloremque, ratione impedit velit doloribus commodi illo vitae nesciunt quod quis, accusamus sed itaque officiis aut ullam facilis aperiam possimus ea.
    						</p>
    					</div>
    
    					<div class="modal-footer">
    						<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
    						<button type="button" class="btn btn-primary">Guardar Cambios</button>						
    					</div>
    				</div>
    			</div>	
    		</div>
    
    	</div>
    </body>
    </html>
    Somebody can help me??
    Last edited by piropeator; 06-23-2016 at 09:46 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •