Jquery alert

Here we are using Jquery Dialog to open Open content in an interactive overlay.

Example

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(document).ready(function() {
	$( "#dialog" ).hide(); // Hiding this dialog at page load
	$(document).on("click", "#anyButton", function(e) {
		$( "#dialog" ).dialog(); // calling dialog
	});
});
  </script>
</head>
<body>

	<button type="button" id="anyButton">Click</button>

	<div id="dialog" title="Basic dialog">
		<p>Text for sample dialog</p>
	</div>

</body>
</html>

Output

Untitled

Share

You may also like...