<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="jq183.js"></script>
</head>
<body>
<input type="button" id="down" value="slideDown">
<input type="button" id="up" value="slideUp">
<input type="button" id="toggle" value="slideToggle">
<br>
<hr>
<img src="./flower1.jpg" alt="" id="re">
</body>
<script>
//给指定按钮绑定单击事件 实现图片滑动收起和隐藏
$('#down').click(function(){
$('#re').slideDown(3000,function(){
alert('我来啦!');
});
})
$('#up').click(function(){
$('#re').slideUp(3000,function(){
alert('我走啦!');
});
})
$('#toggle').click(function(){
$('#re').slideToggle(3000,function(){
alert('biubiubiu');
});
})
</script>
</html>
JQuery 实现 图片滑动收起与隐藏
最新推荐文章于 2020-05-19 13:10:58 发布