javascript - Can anybody tell me why my Jquery popup plugin isn't working? -
so i'm using magnific pop plug in (http://dimsemenov.com/plugins/magnific-popup/documentation.html)
this basic html, want button open pop window in page.
any sort of appreciated! :)
<!doctype html> <html lang="en-us"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> </script>--> <script src="./js/jquery-1.11.1.min.js"></script> <script src="./js/jquery.magnific-popup.js"></script> <title>burn burger</title> <script type="text/javascript" src="js/javascript.js"></script> <link rel="stylesheet" type="text/css" href="normalize.css" media="all"> <link rel="stylesheet" href="style/unsemantic-grid-responsive.css" /> <link rel="stylesheet" type="text/css" href="style/style.css" media="all"> </head> <body> <div id="popup"> test pop goes here </div> <button>create , show popup</button> </body> </html>
javascript:
$(document).ready(function () { $('button').magnificpopup({ items: { src: '#popup', type: 'inline' } }); });
jsfiddle: http://jsfiddle.net/trueblueaussie/vgasl/19/
you have applied popup id body, instead of separate div.
<body> <div id="popup"> test pop goes here </div> <button> create , show popup </button>
Comments
Post a Comment