Javascript
/*Corner by Arthur Wulf White
jquery, jquery ui and jeditable required
*/
$(document).ready(function()
{
$("a.magicInput").click(function(e){
e.preventDefault();
$("ol.addItems").append('<li>Something</li>');
$.fancybox.resize();
});
$("a.fancy").fancybox(
{
'scrolling' : 'no',
'autoScale' : true,
'autoDimensions' : true
});
return false;
});
html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>
studyWise - Log in
</title>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="js/fancy/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/fancy.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css" />
<link rel="stylesheet" href="js/fancy/jquery.fancybox.css" type="text/css" media="screen" />
</head>
<body>
<div id="wrap">
<div id="menu">
<a class="fancy" href="#fancybox">Open</a>
</div>
<div id="main">
<div class="secret">
<div id="fancybox">
<a class="magicInput" href="">Ok</a>
<ol class="addItems">
</ol>
</div>
</div>
</div>
</html>
结果:
$.fancybox.resize is not a function
[Break On This Error]
$.fancybox.resize();
fancy.js (line 9)
$.fancybox.resize is not a function
[Break On This Error]
$.fancybox.resize();
fancy.js (line 9)
$.fancybox.resize is not a function
[Break On This Error]
$.fancybox.resize();
fancy.js (line 9)
$.fancybox.resize is not a function
[Break On This Error]
$.fancybox.resize();
我想要的只是一个工作示例,其中fancybox 扩展/拉伸以适应其中的整个列表。谢谢 - 它应该只是 jsfiddle 中的一两行,请帮助,因为我不知道它为什么不工作。