How to add jquery modal popup in PHP?

By Hardik Savani | May 7, 2016 | | 5484 Viewer | Category : Javascript jQuery JQuery UI


This example is make using jquery-ui.js library. We may always need to jquery dialog box in our project because modal is very interesting and specially for GUI. Always we like to use modal for creating data or editing data and also for conformation. So if you think how to set modal in my project then it is very easy you have to just copy bellow example and run in your local you will find result. jquery ui In this example i provide jquery modal example with code so it pretty simple to use.

Example:

<html lang="en">

<head>

<title>JQuery Dialog Box Example</title>

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>

<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

<style type="text/css">

#dialog{

display: none;

}

</style>

</head>

<body>


<button>Click To Open Popup</button>


<div id="dialog" title="Itsolutionstuff.com">

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse

cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non

proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

</div>


<script type="text/javascript">

$("button").click(function(){

$( "#dialog" ).dialog();

});

</script>


</body>

</html>