03 2011 档案

tips:setTimeOut调用函数传参
摘要:setTimeout(function (){test('dd')},5000);function test(a){ alert(a); }test() 五秒后执行 阅读全文

posted @ 2011-03-22 15:45 倪浩 阅读(230) 评论(0) 推荐(0)

笔记:在IE 浏览器中使用 jquery的fadeIn() 效果 英文字符字体加粗
摘要:<div id='test' >fdsfsdf123</div>如 $('#test1').fadeIn(1000) test 中的英文字符在动画效果结束前会加粗解决方法: 为test层设上背景颜色 阅读全文

posted @ 2011-03-11 10:46 倪浩 阅读(282) 评论(0) 推荐(0)

笔记:使用jquery的 offset函数时 在ie6 中出现异常
摘要:解决方法:为使用offset的对象的top,left设上值.(另外需要注意的是offset()只对可见元素生效)例如:<div id='test'style="position:absolute;top:0px;left:0px;width:100px; height:100px;" > test</div>$('#test').offset({'top':100,'left':100}); 阅读全文

posted @ 2011-03-11 10:42 倪浩 阅读(570) 评论(0) 推荐(0)

jquery插件 div居中
摘要:写的一个简单的jquery插件,在IE6.0下,自动把div 的position 属性改为absolute。jQuery.fn.extend({ juzhong:function(){ var p={};//在ie浏览器下用top left 和标签相同的做变量,会出问题 h=$(this).height(); w=$(this).width(); p.top =($(window).height()-h)/2; p.left=($(window).width()-w)/2; if($.browser.msie && $.browser.version=='6.0' 阅读全文

posted @ 2011-03-04 17:38 倪浩 阅读(479) 评论(0) 推荐(0)

导航