/* Customize your modal window here, you can add background image too */
#boxes #dialog {
width:375px;
height:203px;
}
--></mce:style><style type="text/css" media="screen" mce_bogus="1">body { background-color: #fff; font: 16px Helvetica, Arial; color: #fff; }
#mask {
left:0;
top:0;
position:absolute;
z-index:9000;
background-color:#000;
display:none;
}
#boxes .window {
position:fixed;
width:440px;
height:200px;
display:none;
z-index:9999;
padding:20px;
}
/* Customize your modal window here, you can add background image too */
#boxes #dialog {
width:375px;
height:203px;
}</style>
</head>
<body>
<p><a href="#dialog" mce_href="#dialog">Simple Window Modal</a></p>
<div>
<!-- #customize your modal window here -->
<div>
<b>Testing of Modal Window</b> |
<!-- close button is defined as close class -->
<a href="#" mce_href="#">Close it</a>
</div>
<!-- Do not remove div#mask, because you'll need it to fill the whole screen -->
<div></div>
</div>
</body>
</html>
解决IE6″闪”的问题
view plaincopy to clipboardprint?
$("a").click(function(event){
event.preventDefault();
// do something
});
$("a").click(function(event){
event.preventDefault();
// do something
});
图片载入完毕时,触发函数
view plaincopy to clipboardprint?
$(function()
{
$('img').load(function(){alert($(this).height())});
});
$(function()
{
$('img').load(function(){alert($(this).height())});
});
判断元素是否存在
view plaincopy to clipboardprint?
if ($('#myDiv').length) {
// your code
}
if ($('#myDiv').length) {
// your code
}
给选择器指定一个容器(范围)
view plaincopy to clipboardprint?
var selectedItem = $('#listItem' + i);
var selectedItem = $('#listItem' + i, $('.myList'));
var selectedItem = $('#listItem' + i);
var selectedItem = $('#listItem' + i, $('.myList'));
删除一条记录时,闪一下再消失
view plaincopy to clipboardprint?
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");