[英]How to hide div slowly in javascript
http://jsfiddle.net/ssZXA/185/ http://jsfiddle.net/ssZXA/185/
read the documentation about .hide()
the first argument is "duration" 阅读有关
.hide()
的文档,第一个参数是“ duration”
You can use $("#notice").hide('slow');
您可以使用
$("#notice").hide('slow');
Use 采用
$("#notice").slideToggle();
or 要么
$("#notice").fadeOut();
In Place of 代替
$("#notice").hide();
Plz try this: 请尝试以下操作:
$("#notice").hide("slow");
Thanks. 谢谢。
Try with this. 试试这个。
<body>
<div id="myDiv" style="width:200px;height:150px;background-color:red;">
This is the div that will fade out, slide up, then be removed from the DOM.
</div>
<input id="myButton" type="button" value="Fade" />
</body>
$(function() {
$("#myButton").click(function() {
$("#myDiv").fadeTo("slow", 0.00, function(){
$(this).slideUp("slow", function() {
$(this).remove();
});
});
});
});
$(function(){
$(this).html('«');
$('.slider-arrow').click(function(){
var x = $(".slider-arrow").offset();
if (x.left == "308")
{
$( ".slider-arrow, .panel").animate({left: "-=300"}, 700);
}
else
{
$( ".slider-arrow, .panel").animate({left: "+=300"}, 700);
}
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.