摘要: 序 昨天写了篇通过jQuery源码学习javascript(一),里面有一个定义对象C的方法,我早期也没有太注意这个方面的技术细节。后来我查了一下资料,发现里面有很多巧的地方。今天与大家分享。巧妙1:函数 在javascript代码中函数是个不可多得的人才。 ♥它可以归置代码段,封装相对独立的功能。 ♥它也可以实现类,注入OOP思想。 jQuery就是一个函数,你也可以把它当成类(呵呵,本身就是类)。 (function(){ var jQuery = function() { // 函数体 } window.jQuery = wind... 阅读全文
posted @ 2013-06-08 22:49 {前端开发} 阅读(162) 评论(0) 推荐(0) 编辑
摘要: http://www.16sucai.com/uploadfile/show2013/0402002/$(function(){ $('.passcard').hover(function(){ $(this).stop(false,false).animate({'margin-bottom':'-100px'},400) },function(){ $(this).stop(false,false).animate({'margin-bottom':'-320px'},400) }) })jquery页面样式切 阅读全文
posted @ 2013-06-08 13:56 {前端开发} 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>simple js dialog demo</title> <style type="text/cs 阅读全文
posted @ 2013-06-08 13:32 {前端开发} 阅读(168) 评论(0) 推荐(0) 编辑