出于某种原因,我的forsaledialog
div正在加载页面,而不是等待 jQuery 显示它。虽然它在 jsFiddle 中运行良好!
jsFiddle 链接:http: //jsfiddle.net/YDdqP/269/
<div id="forsalejoepopupbutton" >
<span>For Sale</span>
</div>
<div id="forsaledialog" title="For Sale">
this div is not hiding when the page loads!!!!!!!!!!!!!!
i really want a php file here but since it always loads i cant include! what is going on??
</div>
$(function () {
$("#forsaledialog").dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 500
},
hide: {
effect: "explode",
duration: 2000
}
});
$("#forsalejoepopupbutton").click(function () {
$("#forsaledialog").dialog("open");
});
});
EDIT: THIS IS WHAT FIXED IT:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>