1-
21<!doctype html>
32<html lang="en-US" xmlns:fb="https://www.facebook.com/2008/fbml" xmlns:addthis="https://www.addthis.com/help/api-spec" prefix="og: http://ogp.me/ns#" class="no-js">
43<head>
87 <link rel="shortcut icon" href="https://demo.learncodeweb.com/favicon.ico">
98 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
109 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
11- <link rel = " stylesheet" href = " css/lightweightpopup.css" type = " text/css" >
10+ <link rel="stylesheet" href="css/lightweightpopup.css? <?php echo rand (); ?> " type="text/css">
1211 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
1312 <!--[if lt IE 9]>
1413 <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
@@ -74,7 +73,36 @@ function gtag(){dataLayer.push(arguments);}
7473
7574 <div class="container">
7675 <h1><a href="https://learncodeweb.com/php/load-dynamic-data-on-page-scroll-with-php-and-ajax/">How to create a custom POPUP form with PHP & Ajax</a></h1>
77- <div class = " text-center mt-5" ><button type = " button" name = " popup" id = " popup" class = " btn btn-primary" data-href = " contact-us.php" data-content = " ajax" data-width = " 50%" data-height = " 70%" ><i class = " fa fa-fw fa-file-alt" ></i > CLICK HERE</button ></div >
76+ <div class="text-center mt-5">
77+ <button type="button" id="popup" class="btn btn-primary" data-href="contact-us.php" data-content="ajax"><i class="fa fa-fw fa-file-alt"></i> CLICK HERE AJAX</button>
78+ <button type="button" id="inline" class="btn btn-danger" data-content="inline"><i class="fa fa-fw fa-file-alt"></i> CLICK HERE INLINE</button>
79+ <a href="javascript:;" data-href="contact-us.php" class="btn btn-primary" data-content="ajax"><i class="fa fa-fw fa-file-alt"></i> CLICK HERE AJAX</a>
80+ </div>
81+
82+ <div class="inline" style="display:none;">
83+ <form method="post">
84+ <div class="form-group">
85+ <label>First Name</label>
86+ <input type="text" name="name" id="name" class="form-control" placeholder="Enter your first name">
87+ </div>
88+ <div class="form-group">
89+ <label>Last Name</label>
90+ <input type="text" name="name" id="name" class="form-control" placeholder="Enter your last name">
91+ </div>
92+ <div class="form-group">
93+ <label>Email</label>
94+ <input type="email" name="name" id="name" class="form-control" placeholder="Enter your email">
95+ </div>
96+ <div class="form-group">
97+ <label>Message</label>
98+ <textarea rows="5" name="message" id="message" class="form-control" placeholder="Write your message here"></textarea>
99+ </div>
100+ <div class="form-group">
101+ <input type="button" name="button" value="Submit" class="btn btn-danger">
102+ </div>
103+ </form>
104+ </div>
105+
78106 </div>
79107
80108 <div class="container my-4">
@@ -94,10 +122,12 @@ function gtag(){dataLayer.push(arguments);}
94122 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
95123 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
96124 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
97- <script src = " js/lightWeightPopup.js" ></script >
125+ <script src="js/lightWeightPopup.js? <?php echo rand (); ?> "></script>
98126 <script>
99127 $(document).ready(function(e) {
100- $(' #popup' ). lightWeightPopup ({href :' contact-us.php' ,width :' 320px' ,maxWidth :' 90%' });
128+ $('#popup').lightWeightPopup({href:'contact-us.php', width:'90%',maxWidth:'600px' ,title:'Ajax Model'});
129+ $('#inline').lightWeightPopup({width:'95%',maxWidth:'320px' ,title:'Inline Model'});
130+ $('[data-content="ajax"]').lightWeightPopup({width:'95%',maxWidth:'320px' ,title:'Ajax Model'});
101131 });
102132 </script>
103133
0 commit comments