//侧栏随动 var rollStart = $('.feed-mail'), //滚动到此区块的时候开始随动 rollSet = $('.search,.weibo,.group,.feed-mail,.tags'); //添加rollStart之前的随动区块 rollStart.before('<div class="da_rollbox" style="position:fixed;background-color:#fff;width:inherit;"…
直接入题! 当内容页比较长的时候,网站右侧一直是空白,不如放点有用的东西给用户看,最好不要放广告,因为那样很邪恶,你懂的. 好吧,昨天写了这个东西,jQuery滚动随动区块,代码如下: //侧栏随动 var rollStart = $('.feed-mail'), //滚动到此区块的时候开始随动 rollOut = $('.cookie-list'); //隐藏rollStart之后的区块 rollStart.before('<div class="da_rollbox">…
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>jquery div随滚动条滚动效果</title> <script src="../js/jquery-1.11.1.min.js" type="text/javascript"></script> <script type="text/jav…
一,禁止滚动,滚动条不消失,页面大小不闪动 //禁止滚动条滚动 function unScroll() { var top = $(document).scrollTop(); $(document).on('scroll.unable',function (e) { $(document).scrollTop(top); }) } //移除禁止滚动条滚动 function removeUnScroll() { $(document).unbind("scroll.unable");…
<style> *{margin:0px;padding:0px;} div.nav{background:#000000;height:57px;line-height:57px;color:#ffffff;text-align:center;font-family:"微软雅黑", "黑体";font-size:30px;} div.fixedNav{;_position:absolute;_top:expression(eval(document.d…
ZKEACMS的导航默认是不能固定的,随着页面的滚动而滚动,为了有更好的用户体验,当页面往下滚动时,可以将导航固定在顶端,这样方便用户点击. jQuery Pin 借助jQuery的一个插件 jQuery.Pin,这个插件可在用来固定页面中的元素. http://webpop.github.io/jquery.pin/ 添加脚本 向页面中添加脚本,使用 jquery.pin 来固定导航.为了减少添加脚本的次数,可以将脚本添加到布局中,这样所有使用该局的页面都会应用到. 1. 布局组件 -> 默认…
$('.brand_t a').bind('click',function(){ if($(this).attr('title1')){ var toChar = $(this).attr('title1'); }else{ var toChar = $(this).attr('title'); } //取得元素并滑动到当前元素 var t_a = $(".brand_m_t[name='" + toChar+ "']").offset(); $("htm…
  <!doctype html>   <html>   <head>   <meta charset="utf-8">       <title>jQuery文字逐行向上滚动代码 - 站长素材</title>   <link href="css/index.css" rel="stylesheet" type="text/css">   &l…
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <style> .redMark{ color: red; font-weight: bold; } .blueMark{ color: blue; font-weight: bold; } </style> <script src=…
<html><head><script type="text/javascript" src="/jquery/jquery.js"></script><script type="text/javascript">$(document).ready(function(){ $(".btn1").click(function(){ $("div").…