右侧滑动悬浮【jquery】
来源:互联网 发布:手持数据采集器软件 编辑:程序博客网 时间:2024/04/28 19:25
/*====右侧滑动悬浮*/
$(document).ready(function() {
/*右侧滑动*/
$('#qianqi ul li a').not('#back-to-top,#back-to-bot,#qianqi ul li a:eq(1)').on('mouseover', function() {
$(this).stop().animate({
"width": "75px"
}, 100).find('i').stop().fadeIn();
}).on('mouseout', function() {
$(this).stop().animate({
"width": "36px"
}, 200).find('i').stop().fadeOut();;
});
$('#qianqi ul li:eq(2)').addClass('pl_showa');
$('.pl_showa a').on('mouseover', function() {
$(this).children('span').show().css({
"margin-right": "-4px"
});
}).on('mouseout', function() {
$(this).children('span').hide();
});
$(this).find('#back-to-top').hide();
//顶部
$(window).scroll(function() {
if ($(window).scrollTop() > 100) {
$("#back-to-top").fadeIn(500);
} else {
$("#back-to-top").fadeOut(500);
}
});
//点击返回顶部
$("#back-to-top").click(function() {
$('body,html').animate({
scrollTop: 0
}, 80);
return false;
});
//底部
$(window).scroll(function() {
if ($(window).scrollTop() >= $(document).height() - $(window).height()) {
$("#back-to-bot").fadeOut(500);
} else {
$("#back-to-bot").fadeIn(500);
}
});
//点击返回底部
$("#back-to-bot").click(function()
{
$('body,html').animate({
scrollTop: $(document).height() - $(window).height()
}, 80);
return false;
});
});
$(document).ready(function() {
/*右侧滑动*/
$('#qianqi ul li a').not('#back-to-top,#back-to-bot,#qianqi ul li a:eq(1)').on('mouseover', function() {
$(this).stop().animate({
"width": "75px"
}, 100).find('i').stop().fadeIn();
}).on('mouseout', function() {
$(this).stop().animate({
"width": "36px"
}, 200).find('i').stop().fadeOut();;
});
$('#qianqi ul li:eq(2)').addClass('pl_showa');
$('.pl_showa a').on('mouseover', function() {
$(this).children('span').show().css({
"margin-right": "-4px"
});
}).on('mouseout', function() {
$(this).children('span').hide();
});
$(this).find('#back-to-top').hide();
//顶部
$(window).scroll(function() {
if ($(window).scrollTop() > 100) {
$("#back-to-top").fadeIn(500);
} else {
$("#back-to-top").fadeOut(500);
}
});
//点击返回顶部
$("#back-to-top").click(function() {
$('body,html').animate({
scrollTop: 0
}, 80);
return false;
});
//底部
$(window).scroll(function() {
if ($(window).scrollTop() >= $(document).height() - $(window).height()) {
$("#back-to-bot").fadeOut(500);
} else {
$("#back-to-bot").fadeIn(500);
}
});
//点击返回底部
$("#back-to-bot").click(function()
{
$('body,html').animate({
scrollTop: $(document).height() - $(window).height()
}, 80);
return false;
});
});
0 0
- 右侧滑动悬浮【jquery】
- JQuery 从右侧向左滑动
- jquery右侧悬浮弹出在线客服特效
- JQUERY右侧悬浮返回顶部代码
- jquery悬浮在右侧的在线客服代码
- jquery实现悬浮栏上下滑动点击
- [Javascript]右侧悬浮框
- 右侧 固定 悬浮 客服
- 右侧悬浮框
- [Javascript]右侧悬浮框
- 右侧悬浮导航
- 右侧悬浮框
- 网页右侧悬浮广告
- JS右侧悬浮效果
- 右侧悬浮框
- jquery插件:点击拉出的右侧滑动菜单
- 右侧悬浮菜单实例代码
- jQuery简单实现导航栏根据滑动自动悬浮效果
- js option
- WIN10能连上VPN,却无法访问网页
- linux下杀死进程(kill)的N种方法
- Android Studio调试功能使用总结
- RTP协议分析
- 右侧滑动悬浮【jquery】
- 69. Sqrt(x)
- 阿里钉钉和企业微信铺天盖地,大象盯盯专注产品,还有前途吗?
- 【华为OJ】【006-质数因子】
- Xcode的playground中对于SpriteKit物理对象的更新为何无效
- Java锁----Lock实现原理
- 树和森林的遍历
- Docker--image分析
- 服务器配置查看