magnific-popup


Modal dialog. - Confusing


I am trying to open a simple modal dialog and I have been struggling to do this. Can
any one please help? This is the HTML code(please remove pre). This simply doesnot work.
Can any one please tell **strong text**me why? I have not been getting the kind of output that I really
need.
Any one help me.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="css/magnific-popup.css" rel="stylesheet" />
<script src="js/jquery.magnific-popup.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></script>
</head>
<body>
<a class="popup-modal" href="#test-modal">Open modal</a>
<div id="test-modal" class="white-popup-block mfp-hide">
<h1>Modal dialog</h1>
<p>You won't be able to dismiss this by usual means (escape or
click button), but you can close it programatically based on
user choices or actions.</p>
<p><a class="popup-modal-dismiss" href="#">Dismiss</a></p>
</div>
<script>
$(function () {
$('.popup-modal').magnificPopup({
type: 'inline',
preloader: false,
focus: '#username',
modal: true
});
$(document).on('click', '.popup-modal-dismiss', function (e) {
e.preventDefault();
$.magnificPopup.close();
});
});
</script>
</body>
</html>
Load jquery before the magnific-popup plugin, it relies on jquery (I've never used it but I'm assuming so seeeing as it is pre-appended withfixed 'jquery')
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="css/magnific-popup.css" rel="stylesheet" />
<!-- Jquery loaded first here... -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></script>
<!-- Plugins after... -->
<script src="js/jquery.magnific-popup.js"></script>
</head>
<body>

Related Links

What is the best way to test if a Magnific Popup is currently “open”
Apply callback to all instances of Magnific Popup?
Magnific Popup show background image while loading fullres image
Popup - It should load an .aspx page
Modal dialog. - Confusing
Toggle verticalFit on an open image?
Does Magnific Popup support custom events/buttons
I can't get the overflowY option to work in magnific popup
magnific popup group do not working
Magnific-popup: how to get image url from <img src=“…”>?
Styling magnific-popup arrows
magnific popup modal closes on click
Magnific popup: getting “The image could not be loaded”
How to give a fixed size to image in magnific-popup pluggin
magnific popup Inline Lightbox Gallery how to specify item in array from html link
how to make browser back close magnific-popup

Categories

HOME
compiler-construction
openlayers
wso2-am
osgi
hook
gerrit
azure-data-factory
google-api-php-client
session
sd-card
xmpp
elm
constraint-programming
directx
cross-validation
postgres-xl
phaser
flask-wtforms
systemc
openrefine
jsdoc
undefined
shared-hosting
clickonce
excel-2007
pepper
intel-pin
elasticsearch-net
google-cloud-nl
tasklet
bcd
functor
data-manipulation
airconsole
perlin-noise
mmenu
dosbox
hockeyapp
libraries
document.write
webdriver-manager
hp-ux
mime
angular-resource
fault
outlook-2013
chain-builder
elgg
forever
typed-lambda-calculus
mcafee
specrun
bonobo
elements
clang-static-analyzer
nsviewcontroller
lua-5.1
suffix-tree
xpath-1.0
cartesian-product
thredds
sframe
0xdbe
web-controls
bigbluebutton
formatjs
phalanger
html-helper
dml
fmod
dbconnection
batterylevel
lcs
specification-pattern
angularjs-controller
e4x
online-compilation
postgresql-performance
jquery-ui-layout
hgsubversion
window-management
f#-powerpack
telerik-scheduler
html-input
w3wp.exe
filtered-index
zend-tool
brewmp
kdbg
adrotator
zune
post-build
rtml

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App