|
|
|
fancy box สามารถทำให้เปิด new tap แล้วปิด fancy box เอง ไหมคับ มีวิธีทำยังไง บอกหน่อยคับ |
|
|
|
|
|
|
|
เขียนให้ดูคร่าวๆน่ะครับ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" type="text/css" media="screen" />
</head>
<body>
<a id="inline" href="#data">This shows content of element who has id="data"</a>
<div style="display:none"><div id="data">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div></div>
<script type="text/javascript">
$(document).ready(function() {
$("a#inline").fancybox({
afterLoad: function(){
setInterval(function(){ $.fancybox.close(); },3000);
}
});
});
</script>
</body>
</html>
|
ประวัติการแก้ไข 2015-02-27 08:40:21
|
|
|
|
Date :
2015-02-27 08:34:22 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อันนี้ทดลองแล้วครับ http://jsfiddle.net/6zufge8n/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" type="text/css" media="screen" />
</head>
<body>
<a id="inline" href="#data">This shows content of element who has id="data"</a>
<div style="display:none"><div id="data">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div></div>
<br />
<a id="inline2" href="#data2">This shows content of element who has id="data"</a>
<div style="display:none"><div id="data2">Hello Lorem.</div></div>
<script type="text/javascript">
$(document).ready(function() {
$("#inline").fancybox({
hideOnContentClick: true,
afterLoad: function(){
var time = setInterval(function(){
$.fancybox.close();
$("#inline2").trigger("click");
clearInterval(time);},3000);
}
});
$("#inline2").fancybox();
});
</script>
</body>
</html>
|
ประวัติการแก้ไข 2015-02-27 08:51:33
|
|
|
|
Date :
2015-02-27 08:50:30 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|