读者的进步速度远大于博客的进步速度。
2008年09月30日Javascript

没有评论
38 views

JavaScript—new Date().getTime()的简写方式.

案例;

http://www.cssrain.cn/demo/3/newDate.html

知识:
[code]
(1)getTime(new Date.getTime 方法)
返回指定的 Date 对象自 1970 年 1 月 1 日午夜(通用时间)以来的毫秒数。当比较两个或更多个 Date 对象时,使用此方法表示某一特定时刻。
返回值类型:Number -- 一个整数。
(2)
function now(){
return +new Date;
}
jQuery 源代码里就是使用的 +new Date ;
(3)
用来判断 google 浏览器:
if( !isNaN(Date.parse("1970.01.01")) ){
alert("This is Google Chrome!");
}else{
alert("This is NOT!");
}
[/code]

jQuery—标签式导航菜单.


官方地址:

http://nettuts.s3.amazonaws.com/009_jQueryMenu/sm/result/index.html

jQuery—仿苹果网站的图片放大


官方地址:

http://orderedlist.com/demos/fancy-zoom-jquery/

jQuery—jParallax(仿生视角).



官方地址:

http://webdev.stephband.info/parallax.html

jQuery—类似flash菜单


效果地址:

http://www.kriesi.at/wp-content/extra_data/kwicks_tutorial/kwicks_4.html

教程地址:

http://www.kriesi.at/archives/apple-menu-improved-with-jquery

2008年09月29日TeamWork

没有评论
54 views

jQuery—为链接添加链接图像.


演示:

http://www.cssrain.cn/demo/external/demo.html

代码:
[code]$(document).ready(function() {
$('#extlinks a').filter(function() {
return this.hostname && this.hostname !== location.hostname;
}).after(' link');
});
//this.hostname : 当前链接href的 www.**.com
//location.hostname : 地址栏的 www.**.com[/code]

JavaScript—旋转导航菜单.


演示:

http://www.cssrain.cn/demo/roundImg/round.html

下载:

http://www.cssrain.cn/demo/roundImg/roundImg.rar

jQuery快讯—jQuery将与Microsoft and Nokia 合作。

今天在 jQuery 的官方 blog 上看到「jQuery, Microsoft, and Nokia」这个消息,
大概说的是,Microsoft 和 Nokia 这2个公司 对于 jQuery 感兴趣。
Microsoft 打算在自家的 ASP.Net Ajax Framework 上加入 jQuery 的使用,
具体表现在:
第一就是可能会在以后发行的 Visual Studio中 加入 jQuery 。
第二是 .Net 的开发团队可能会使用jQuery来制作一些UI元件,或者控件等等。
Microsoft的员工也对此发表了看法。

http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx

http://www.hanselman.com/blog/jQueryToShipWithASPNETMVCAndVisualStudio.aspx

Nokia则打算把jQuery 使用在自家的 Widget development platform — Web Runtime 上面,
所以,可能以后的Nokia手机系统 都会附带一份jQuery core 。
相信有了这2家商业公司的注入,jQuery的社区动力 又会激发不少,
可能过不了多久 可以得到更多patches 或 enhancements。
学不学习jQuery , 自己看着办吧。 ^_^

2008年09月28日Ajax

没有评论
41 views

jQuery—animate progressbar.


演示:

http://www.cssrain.cn/demo/3/pro.html

大概思路就是
为div里创建一个table tr td。
然后通过给tr td添加颜色,来达到这样的效果。
原文:

http://www.ribosomatic.com/articulos/barra-de-progreso-animada-con-jquery

JavaScript—-关于数字类型和字符类型相加

案例:

http://www.cssrain.cn/demo/3/JsAdd.html

总结:
(1)数字跟字符相加,自动转换为 字符环境。
(2)NaN是一种特殊的number。

返回顶部