Created
June 2, 2016 19:15
-
-
Save anonymous/8cf1943bd68df44d80d5e855455c2a3d to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/zijipej
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" /> | |
<script src="https://code.jquery.com/jquery-1.11.3.js"></script> | |
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css"> | |
<style id="jsbin-css"> | |
#scroll { | |
height: 1500px; | |
} | |
body { | |
padding: 50px 0; | |
} | |
</style> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.pack.js"></script> | |
<div id="scroll"> | |
Just keep scrolling | |
</div> | |
<button id="btn">Open Fancybox</button> | |
<script id="jsbin-javascript"> | |
'use strict'; | |
var template = '\n <div id="popup" >\n <input type="hidden" id="datepicker" value="Click here">\n </div>\n'; | |
$('#btn').on('click', function () { | |
$.fancybox.open({ | |
content: template, | |
type: "html", | |
modal: true, | |
closeBtn: false, | |
closeClick: false, | |
fitToView: false, | |
width: 'auto', | |
height: 'auto' | |
}); | |
$('#datepicker').datepicker({ | |
showOn: 'button' | |
}); | |
}); | |
</script> | |
<script id="jsbin-source-css" type="text/css">#scroll { | |
height: 1500px; | |
} | |
body { | |
padding: 50px 0; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript"> | |
let template = ` | |
<div id="popup" > | |
<input type="hidden" id="datepicker" value="Click here"> | |
</div> | |
`; | |
$('#btn').on('click', function() { | |
$.fancybox.open({ | |
content: template, | |
type: "html", | |
modal: true, | |
closeBtn: false, | |
closeClick: false, | |
fitToView: false, | |
width: 'auto', | |
height: 'auto' | |
}); | |
$('#datepicker').datepicker({ | |
showOn: 'button', | |
}); | |
}); | |
</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#scroll { | |
height: 1500px; | |
} | |
body { | |
padding: 50px 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var template = '\n <div id="popup" >\n <input type="hidden" id="datepicker" value="Click here">\n </div>\n'; | |
$('#btn').on('click', function () { | |
$.fancybox.open({ | |
content: template, | |
type: "html", | |
modal: true, | |
closeBtn: false, | |
closeClick: false, | |
fitToView: false, | |
width: 'auto', | |
height: 'auto' | |
}); | |
$('#datepicker').datepicker({ | |
showOn: 'button' | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment