<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>我想网 &#187; JQuery</title>
	<atom:link href="http://www.iwanna.cn/tags/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iwanna.cn</link>
	<description></description>
	<lastBuildDate>Mon, 26 Dec 2011 05:46:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>10个给力的jQuery图片插件</title>
		<link>http://www.iwanna.cn/archives/2011/02/06/6278/</link>
		<comments>http://www.iwanna.cn/archives/2011/02/06/6278/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 14:06:06 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=6278</guid>
		<description><![CDATA[jQuery越来越流行，也就越来越多的开发者制作各种各样的jQuery插件。它们当中的一些非常的酷，例如之前介绍的“2010年最佳jQuery插件”和现在有介绍的10个给力的jQuery图片插件： 如果你也想让你的博客上的图片让人眼前一亮，不妨试试WDL博客推荐的10个jQuery图片插件。 Slides Slides是一个灰常简单的幻灯片 jQuery插件。包括的功能有循环，自动播放，渐变和幻灯片过渡效果包括淡出淡入，图像预装载和自动生成分页等。 Face Detection Face Detection，插件如其名，它检测照片中的人脸，就像照相机那样自动对焦。 AviaSlider AviaSlider这个 jQuery 幻灯片插件最大的亮点在于它的过渡效果，神马过渡效果，自个儿去看不就知道了。 Fullscreenr 想自己的网站用一张大图作背景，而且长宽比例不变？而且必须在中间的位置，而不只是指图像的左上角部分？那么Fullscreenr插件做到了。 Slidy jQuery Slidy 是一个可自动生成并可定制的幻灯片转换插件。 MobilyNotes MobilyNotes是一个轻量级的jQuery插件（只有2KB），可以堆叠的形式显示你的图片集或者HTML内容集。 jQuery Easy Slides Easy Slides是一个非常容易上手的幻灯片制作插件。它还有轻量级的优势，加上 Javascript和CSS才不超过2.1KB。 Booklet 想你的图片幻灯片转换效果像翻转一本书那样？Booklet这个 jQuery插件是你不二的选择。 MobilySelect MobilySelect又一轻量型 jQuery插件（仅2KB）。可以实现两种图片分类选择特效，个人觉得这个插件很不错。 Pikachoose Pikachoose是一个轻量级的jQuery插件，轻松实现图片集的幻灯片演示，还有图片导航和自动播放选项设置。 赶着去喝喜酒，草草翻译，质量欠佳，况且英文水平本来有限，望见谅。实在不行，请观摩原文或者直接去体验插件演示demo。（注：这是一篇预发布文章） MobilySelect又一轻量型 jQuery插件（仅2KB）。可以实现两种图片分类选择特效，个人觉得这个插件很不错。 © 我想网 Akon 所有 , 2011. &#124; 永久链接 &#124; 没有评论 &#124; 提交到 Google Reader 鲜果 抓虾 Feed [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery越来越流行，也就越来越多的开发者制作各种各样的jQuery插件。它们当中的一些非常的酷，例如之前介绍的“<a href="http://www.iwanna.cn/archives/2011/02/06/6283/" target="_blank" title="2010年最佳jQuery插件">2010年最佳jQuery插件</a>”和现在有介绍的<a href="http://www.iwanna.cn/archives/2011/02/06/6278/" title="10个给力的jQuery图片插件">10个给力的jQuery图片插件</a>：</p>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_9.jpg"><img title="jquery_image_9" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_9.jpg" alt="jquery image 9 " width="480" height="260" /></a></p>
<p>如果你也想让你的博客上的图片让人眼前一亮，不妨试试WDL博客推荐的10个jQuery图片插件。<br />
<span id="more-6278"></span></p>
<h3><a href="http://www.slidesjs.com/" target="_blank">Slides</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_1.jpg"><img title="jquery_image_1" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_1.jpg" alt="jquery image 1 " width="480" height="259" /></a></p>
<p>Slides是一个灰常简单的幻灯片 <a href="http://www.iwanna.cn/tags/jquery%e6%8f%92%e4%bb%b6/" class="st_tag internal_tag" rel="tag" title="标签 JQuery插件 下的日志">jQuery插件</a>。包括的功能有循环，自动播放，渐变和幻灯片过渡效果包括淡出淡入，图像预装载和自动生成分页等。</p>
<h3><a href="http://facedetection.jaysalvat.com/" target="_blank">Face Detection</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_2.jpg"><img title="jquery_image_2" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_2.jpg" alt="jquery image 2 " width="480" height="319" /></a></p>
<p>Face Detection，插件如其名，它检测照片中的人脸，就像照相机那样自动对焦。</p>
<h3><a href="http://aviathemes.com/aviaslider/" target="_blank">AviaSlider</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_3.jpg"><img title="jquery_image_3" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_3.jpg" alt="jquery image 3 " width="480" height="277" /></a></p>
<p>AviaSlider这个 <a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a> 幻灯片插件最大的亮点在于它的过渡效果，神马过渡效果，自个儿去看不就知道了。</p>
<h3><a href="http://nanotux.com/blog/fullscreen/" target="_blank">Fullscreenr</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_4.jpg"><img title="jquery_image_4" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_4.jpg" alt="jquery image 4 " width="480" height="388" /></a></p>
<p>想自己的网站用一张大图作背景，而且长宽比例不变？而且必须在中间的位置，而不只是指图像的左上角部分？那么Fullscreenr插件做到了。</p>
<h3><a href="http://www.wbotelhos.com/slidy/" target="_blank">Slidy</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_5.jpg"><img title="jquery_image_5" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_5.jpg" alt="jquery image 5 " width="480" height="218" /></a></p>
<p>jQuery Slidy 是一个可自动生成并可定制的幻灯片转换插件。</p>
<h3><a href="http://playground.mobily.pl/jquery/mobily-notes.html" target="_blank">MobilyNotes</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_6.jpg"><img title="jquery_image_6" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_6.jpg" alt="jquery image 6 " width="480" height="245" /></a></p>
<p>MobilyNotes是一个轻量级的jQuery插件（只有2KB），可以堆叠的形式显示你的图片集或者HTML内容集。</p>
<h3><a href="http://dev.daledavies.co.uk/easyslides/" target="_blank">jQuery Easy Slides</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_7.jpg"><img title="jquery_image_7" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_7.jpg" alt="jquery image 7 " width="480" height="320" /></a></p>
<p>Easy Slides是一个非常容易上手的幻灯片制作插件。它还有轻量级的优势，加上 Javascript和CSS才不超过2.1KB。</p>
<h3><a href="http://builtbywill.com/code/booklet/" target="_blank">Booklet</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_8.jpg"><img title="jquery_image_8" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_8.jpg" alt="jquery image 8 " width="480" height="336" /></a></p>
<p>想你的图片幻灯片转换效果像翻转一本书那样？Booklet这个 jQuery插件是你不二的选择。</p>
<h3><a href="http://playground.mobily.pl/jquery/mobily-select.html" target="_blank">MobilySelect</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_9.jpg"><img title="jquery_image_9" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_9.jpg" alt="jquery image 9 " width="480" height="260" /></a></p>
<div id="_mcePaste">MobilySelect又一轻量型 jQuery插件（仅2KB）。可以实现两种图片分类选择特效，个人觉得这个插件很不错。</div>
<h3><a href="http://pikachoose.com/demo/" target="_blank">Pikachoose</a></h3>
<p><a href="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_10.jpg"><img title="jquery_image_10" src="http://images.uheed.com/iwanna/2011/02/06/jquery-plugins/jquery_image_10.jpg" alt="jquery image 10 " width="480" height="361" /></a></p>
<p>Pikachoose是一个轻量级的jQuery插件，轻松实现图片集的幻灯片演示，还有图片导航和自动播放选项设置。</p>
<p>赶着去喝喜酒，草草翻译，质量欠佳，况且英文水平本来有限，望见谅。实在不行，请观摩原文或者直接去体验插件演示demo。（注：这是一篇预发布文章）</p>
<p>MobilySelect又一轻量型 jQuery插件（仅2KB）。可以实现两种图片分类选择特效，个人觉得这个插件很不错。</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2011. |
<a href="http://www.iwanna.cn/archives/2011/02/06/6278/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2011/02/06/6278/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2011/02/06/6278/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2011/02/06/6278/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2011/02/06/6278/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2011/02/06/6278/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2010年最佳jQuery插件</title>
		<link>http://www.iwanna.cn/archives/2011/02/06/6283/</link>
		<comments>http://www.iwanna.cn/archives/2011/02/06/6283/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 14:05:22 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=6283</guid>
		<description><![CDATA[在2010年，JavaScript框架继续日渐普及，这使得大量的插件被开发出来。满目琳琅，难以 选择心头之好。WDL的作者从大量的优秀jQuery插件精心筛选出一些对Web Designers有帮助的和具备非常不错的视觉效果的Best of the best。 2010年最佳jQuery插件（排名不分先后）： Nivo Slider 一个加载设置拥有9种过度效果的超级smooth slider，它还支持如链接图像和键盘导航等内容。 Quicksand 通过一个非常不错的洗牌动画实现选项内容重新排序，只需要指定源容器和替换源的目标collection 。新元素将会以奇特缩放+阿尔法效果出现，消失的元素(non-existant in destination collection)平滑地消失或重新排位，移动到它们的目标位置。 Spritely Spritely 是一个由Artlogic开发的 jQuery插件，用于使用纯HTML和JavaScript创建动态物体和背景动画。 Lettering.js Lettering.js是一个轻量经的、易于使用的 jQuery插件，可创造出极具个性的网页排版。 Colortip Colortip可转换你的页面元素的标题属性为一系列色彩丰富的提示（当你的鼠标移动到不同的标题上会出现不同颜色的字体文本提示）。支持六种色彩主题，这样你可更加容易融合到你的个人网页中去。 Masonry Masonry是一个 jQuery布局插件. 你可以将它看作CSS floats的另一面。浮动元素的排列是先水平后垂直，Masonry排列内容是根据一个网格先垂直后水平的。 gvChart gvChart是一个使用Google Charts了的jQuery插件，可通过HTML table tag的数据实现交互可视化。它非常容易上手，此外它支持创建五种风格的图标。 Animated table sort 这是一个用于创建表格的jQuery插件，所创建的表格可以根据不同的列项目进行A-Z，升序排列，切换效果非常不错。 jQuery Image Scale Carousel 网站图片保持完整的纵横比比什么都重要。这个jQuery插件可以完美地在slider展示你所有的图片，而不需担心产生变形。 jQuery Image Scale Carousel插件自动改变你所有图片到适合大小，一切都是那么的简单。 YoxView YoxView是一个免费的多媒体播放jQuery插件。它易于使用，功能丰富。你可以用它来展示各种媒体，如图像，视频，内嵌的内容，iframes，Flash等等。 © 我想网 Akon 所有 [...]]]></description>
			<content:encoded><![CDATA[<p>在2010年，JavaScript框架继续日渐普及，这使得大量的插件被开发出来。满目琳琅，难以 选择心头之好。WDL的作者从大量的优秀jQuery插件精心筛选出一些对Web Designers有帮助的和具备非常不错的视觉效果的Best of  the best。</p>
<p><img title="best-jquery-plugins-of-2010" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/best-jquery-plugins-of-2010.jpg" alt="2010年最佳jQuery插件 " width="450" height="200" /></p>
<p>2010年最佳jQuery插件（排名不分先后）：</p>
<h3><a href="http://nivo.dev7studios.com/" target="_blank">Nivo Slider</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Nivo-Slider" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Nivo-Slider.jpg" alt="2010年最佳jQuery插件 Nivo Slider " width="480" height="236" /><br />
<span id="more-6283"></span><br />
一个加载设置拥有9种过度效果的超级smooth slider，它还支持如链接图像和键盘导航等内容。</p>
<h3><a href="http://razorjack.net/quicksand/" target="_blank">Quicksand</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Quicksand" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Quicksand.jpg" alt="2010年最佳jQuery插件 Quicksand " width="480" height="293" /></p>
<p>通过一个非常不错的洗牌动画实现选项内容重新排序，只需要指定源容器和替换源的目标collection  。新元素将会以奇特缩放+阿尔法效果出现，消失的元素(non-existant in destination  collection)平滑地消失或重新排位，移动到它们的目标位置。</p>
<h3><a href="http://spritely.net/" target="_blank">Spritely</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Spritely" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Spritely.jpg" alt="2010年最佳jQuery插件 Spritely " width="480" height="257" /></p>
<p>Spritely 是一个由Artlogic开发的 <a href="http://www.iwanna.cn/tags/jquery%e6%8f%92%e4%bb%b6/" class="st_tag internal_tag" rel="tag" title="标签 JQuery插件 下的日志">jQuery插件</a>，用于使用纯HTML和JavaScript创建动态物体和背景动画。</p>
<h3><a href="http://daverupert.com/2010/09/lettering-js/" target="_blank">Lettering.js</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Lettering.js" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Lettering.js.jpg" alt="2010年最佳jQuery插件 Lettering.js " width="480" height="213" /></p>
<p>Lettering.js是一个轻量经的、易于使用的 jQuery插件，可创造出极具个性的网页排版。</p>
<h3><a href="http://tutorialzine.com/2010/07/colortips-jquery-tooltip-plugin/" target="_blank">Colortip</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Colortip" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Colortip.jpg" alt="2010年最佳jQuery插件 Colortip " width="480" height="260" /></p>
<p>Colortip可转换你的页面元素的标题属性为一系列色彩丰富的提示（当你的鼠标移动到不同的标题上会出现不同颜色的字体文本提示）。支持六种色彩主题，这样你可更加容易融合到你的个人网页中去。</p>
<h3><a href="http://desandro.com/resources/jquery-masonry/" target="_blank">Masonry</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Masonry" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Masonry.jpg" alt="2010年最佳jQuery插件 Masonry " width="480" height="322" /></p>
<p>Masonry是一个 jQuery布局插件. 你可以将它看作CSS floats的另一面。浮动元素的排列是先水平后垂直，Masonry排列内容是根据一个网格先垂直后水平的。</p>
<h3><a href="http://www.ivellios.toron.pl/technikalia/2010/06/22/gvchart-plugin-jquery-with-google-charts/" target="_blank">gvChart</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-gvChart" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-gvChart.jpg" alt="2010年最佳jQuery插件 gvChart " width="480" height="204" /></p>
<p>gvChart是一个使用Google Charts了的jQuery插件，可通过HTML table tag的数据实现交互可视化。它非常容易上手，此外它支持创建五种风格的图标。</p>
<h3><a href="http://www.mitya.co.uk/scripts/Animated-table-sort-REGEXP-friendly-111" target="_blank">Animated table sort</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Animated-table-sort" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-Animated-table-sort.jpg" alt="2010年最佳jQuery插件 Animated table sort " width="454" height="260" /></p>
<p>这是一个用于创建表格的jQuery插件，所创建的表格可以根据不同的列项目进行A-Z，升序排列，切换效果非常不错。</p>
<h3><a href="http://johnpatrickgiven.com/jquery/Image-Scale-Carousel/" target="_blank">jQuery Image Scale Carousel</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-jQuery-Image-Scale-Carousel" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-jQuery-Image-Scale-Carousel.jpg" alt="2010年最佳jQuery插件 jQuery Image Scale Carousel " width="480" height="292" /></p>
<p>网站图片保持完整的纵横比比什么都重要。这个jQuery插件可以完美地在slider展示你所有的图片，而不需担心产生变形。 <a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a> Image Scale Carousel插件自动改变你所有图片到适合大小，一切都是那么的简单。</p>
<h3><a href="http://www.yoxigen.com/yoxview/" target="_blank">YoxView</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-YoxView" src="http://images.uheed.com/iwanna/2011/02/06/best-jquery-plugin-2010/Best-jQuery-Plugins-of-2010-YoxView.jpg" alt="2010年最佳jQuery插件 YoxView " width="480" height="247" /></p>
<p>YoxView是一个免费的多媒体播放jQuery插件。它易于使用，功能丰富。你可以用它来展示各种媒体，如图像，视频，内嵌的内容，iframes，Flash等等。</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2011. |
<a href="http://www.iwanna.cn/archives/2011/02/06/6283/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2011/02/06/6283/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2011/02/06/6283/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2011/02/06/6283/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2011/02/06/6283/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2011/02/06/6283/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.5 正式版发布</title>
		<link>http://www.iwanna.cn/archives/2011/02/03/6272/</link>
		<comments>http://www.iwanna.cn/archives/2011/02/03/6272/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 09:23:58 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[download]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=6272</guid>
		<description><![CDATA[jQuery 1.5正式版于1月31日如期发布！ jQuery是一个JavaScript库，它简化了HTML文档遍历，事件处理，动画和为网络快速发展的Ajax交互。变化包括一个重写的Ajax模 块，划分 jQuery子类的能力，以及许多其他功能增强，修复各种内存泄漏，性能改进和加强跨浏览器的兼容。鼓励测试该版本的用户提供反馈和报告他们遇到的任何错 误。 Right on schedule jQuery 1.5 is ready for consumption! This release has been a long time coming and has been a real team effort. Please take this opportunity to thank members of the jQuery Team and the jQuery bug triage team for their help in getting this release out [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a> 1.5正式版于1月31日如期发布！  jQuery是一个JavaScript库，它简化了HTML文档遍历，事件处理，动画和为网络快速发展的Ajax交互。变化包括一个重写的Ajax模 块，划分    jQuery子类的能力，以及许多其他功能增强，修复各种内存泄漏，性能改进和加强跨浏览器的兼容。鼓励测试该版本的用户提供反馈和报告他们遇到的任何错 误。 		Right on schedule <a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a> 1.5 is ready for consumption!<br />
This release has been a long time coming and has been a real team  effort. Please take this opportunity to thank members of the jQuery Team  and the jQuery bug triage team for their help in getting this release  out the door.</p>
<p>下载地址：<br />
jQuery Minified (29kb Gzipped)<br />
jQuery Regular (207kb)</p>
<p>Microsoft CDN: <a href="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.min.js">http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.min.js</a><br />
<span id="more-6272"></span><br />
关于jQuery 1.5</p>
<p>该版本修复了83个bug，解决了460个问题。</p>
<p>针对下列浏览器进行了测试：<br />
Safari 5.0.3 / 4.0.5 / 3.2.3 / 3.1.2<br />
Opera 11.01 / 11 / 10.63 / 10.54 / 10.10 / 9.64<br />
IE 6 / 7 / 8<br />
Firefox 4.0b9 / 3.6.13 / 3.5.11 / 3.0.19 / 2.0.0.20<br />
Chrome 8.0.552.215 / 8.0.552.237 / 9.0.597.67 Beta / 10.0.642.2 Dev</p>
<p>jQuery 1.5 API文档：<a href="http://api.jquery.com/category/version/1.5/">http://api.jquery.com/category/version/1.5/</a></p>
<p>重大改进</p>
<p>1. 重写了Ajax模块：</p>
<p>a) 提供了更高级的统一的API；</p>
<p>b) Ajax请求会返回一个封装不同浏览器XMLHttpRequest的jXHR对像，可以完成以前不可能完成的任务，比如：放弃JSONP请求，详见jQuery.<a href="http://www.iwanna.cn/tags/ajax/" class="st_tag internal_tag" rel="tag" title="标签 Ajax 下的日志">ajax</a>()文档；</p>
<p>c) 更好的扩展性，可以方便地扩展Ajax的发送与接收，管理Ajax请求，详见Extending Ajax文档。</p>
<p>2. 新增延缓对像(Deferred Objects)</p>
<p>a) 直接使用没有立即返回的返回值，比如异步Ajax请求的返回结果；</p>
<p>b) 附加多个事件处理器（这在以前是不可能的），示例代码：<br />
// Assign handlers immediately after making the request,<br />
// and remember the jxhr object for this request<br />
var jxhr = $.ajax({ url: &#8220;example.php&#8221; })<br />
.success(function() { alert(&#8220;success&#8221;); })<br />
.error(function() { alert(&#8220;error&#8221;); })<br />
.complete(function() { alert(&#8220;complete&#8221;); });</p>
<p>// perform other work here &#8230;</p>
<p>// Set another completion function for the request above<br />
jxhr.complete(function(){ alert(&#8220;second complete&#8221;); });</p>
<p>了解更多内容，请阅读Deferred Object文档。</p>
<p>推荐教程：Using Deferreds in jQuery 1.5</p>
<p>3. jQuery替身——jQuery.sub()</p>
<p>可以方便地创建jQuery副本，不影响原有的jQuery对像，避免jQuery冲突。示例代码如下：</p>
<p>(function(){<br />
var sub$ = jQuery.sub();</p>
<p>sub$.fn.myCustomMethod = function(){<br />
return &#8216;just for me&#8217;;<br />
};</p>
<p>sub$(document).ready(function() {<br />
sub$(&#8216;body&#8217;).myCustomMethod() // &#8216;just for me&#8217;<br />
});<br />
})();</p>
<p>typeof jQuery(&#8216;body&#8217;).myCustomMethod // undefined</p>
<p>了解更多，请阅读jQuery.sub()文档。</p>
<p>4. 增强了遍历相邻节点的性能</p>
<p>增强的遍历方法：.children(), .prev(), .next()，究竟增强多少，请看下图：</p>
<p>5. jQuery开发团队构建系统的改进</p>
<p>现在jQuery的构建基于服务端JavaScript环境——NodeJS，以前用的是Java/Rhino。编译器用的是来自Google Closure Compiler的UglifyJS，编译后的js文件更小。</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2011. |
<a href="http://www.iwanna.cn/archives/2011/02/03/6272/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2011/02/03/6272/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2011/02/03/6272/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2011/02/03/6272/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2011/02/03/6272/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2011/02/03/6272/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2010年最佳jQuery插件</title>
		<link>http://www.iwanna.cn/archives/2010/12/05/6055/</link>
		<comments>http://www.iwanna.cn/archives/2010/12/05/6055/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 14:19:10 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=6055</guid>
		<description><![CDATA[在前两周国外知名博客WDL先后分享了“2010最佳系列”中的“最佳免费 WordPress主题”和“最佳免费字体”，在这个 星期又发布了2010年最佳jQuery插件。在2010年，JavaScript框架继续日渐普及，这使得大量的插件被开发出来。满目琳琅，难以选择心 头之好。WDL的作者从大量的优秀jQuery插件精心筛选出一些对Web Designers有帮助的和具备非常不错的视觉效果的Best of the best。 2010年最佳jQuery插件（排名不分先后）： Nivo Slider 一个加载设置拥有9种过度效果的超级smooth slider，它还支持如链接图像和键盘导航等内容。 Quicksand 通过一个非常不错的洗牌动画实现选项内容重新排序，只需要指定源容器和替换源的目标collection 。新元素将会以奇特缩放+阿尔法效果出现，消失的元素(non-existant in destination collection)平滑地消失或重新排位，移动到它们的目标位置。 Spritely Spritely 是一个由Artlogic开发的 jQuery插件，用于使用纯HTML和JavaScript创建动态物体和背景动画。 Lettering.js Lettering.js是一个轻量经的、易于使用的 jQuery插件，可创造出极具个性的网页排版。 Colortip Colortip可转换你的页面元素的标题属性为一系列色彩丰富的提示（当你的鼠标移动到不同的标题上会出现不同颜色的字体文本提示）。支持六种色彩主题，这样你可更加容易融合到你的个人网页中去。 Masonry Masonry是一个 jQuery布局插件. 你可以将它看作CSS floats的另一面。浮动元素的排列是先水平后垂直，Masonry排列内容是根据一个网格先垂直后水平的。 gvChart gvChart是一个使用Google Charts了的jQuery插件，可通过HTML table tag的数据实现交互可视化。它非常容易上手，此外它支持创建五种风格的图标。 Animated table sort 这是一个用于创建表格的jQuery插件，所创建的表格可以根据不同的列项目进行A-Z，升序排列，切换效果非常不错。 jQuery Image Scale Carousel 网站图片保持完整的纵横比比什么都重要。这个jQuery插件可以完美地在slider展示你所有的图片，而不需担心产生变形。 jQuery Image Scale Carousel插件自动改变你所有图片到适合大小，一切都是那么的简单。 YoxView YoxView是一个免费的多媒体播放jQuery插件。它易于使用，功能丰富。你可以用它来展示各种媒体，如图像，视频，内嵌的内容，iframes，Flash等等。 © 我想网 [...]]]></description>
			<content:encoded><![CDATA[<p>在前两周国外知名博客WDL先后分享了“2010最佳系列”中的“<a href="http://www.x-berry.com/best-free-wordpress-themes-of-2010">最佳免费 WordPress主题</a>”和“<a href="http://www.x-berry.com/best-english-fonts-in-2010">最佳免费字体</a>”，在这个 星期又发布了2010年最佳jQuery插件。在2010年，JavaScript框架继续日渐普及，这使得大量的插件被开发出来。满目琳琅，难以选择心 头之好。WDL的作者从大量的优秀jQuery插件精心筛选出一些对Web Designers有帮助的和具备非常不错的视觉效果的Best of  the best。</p>
<p><img title="best-jquery-plugins-of-2010" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/11405402062353432.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="450" height="200" /></p>
<p>2010年最佳jQuery插件（排名不分先后）：</p>
<h3><a href="http://nivo.dev7studios.com/" target="_blank">Nivo Slider</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Nivo-Slider" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/11405412111484591.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="236" /></p>
<p>一个加载设置拥有9种过度效果的超级smooth slider，它还支持如链接图像和键盘导航等内容。<br />
<span id="more-6055"></span></p>
<h3><a href="http://razorjack.net/quicksand/" target="_blank">Quicksand</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Quicksand" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/1140542353351013.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="293" /></p>
<p>通过一个非常不错的洗牌动画实现选项内容重新排序，只需要指定源容器和替换源的目标collection   。新元素将会以奇特缩放+阿尔法效果出现，消失的元素(non-existant in destination   collection)平滑地消失或重新排位，移动到它们的目标位置。</p>
<h3><a href="http://spritely.net/" target="_blank">Spritely</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Spritely" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/11405532065954676.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="257" /></p>
<p>Spritely 是一个由Artlogic开发的 <a href="http://www.iwanna.cn/tags/jquery%e6%8f%92%e4%bb%b6/" class="st_tag internal_tag" rel="tag" title="标签 JQuery插件 下的日志">jQuery插件</a>，用于使用纯HTML和JavaScript创建动态物体和背景动画。</p>
<h3><a href="http://daverupert.com/2010/09/lettering-js/" target="_blank">Lettering.js</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Lettering.js" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/11405541013700072.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="213" /></p>
<p>Lettering.js是一个轻量经的、易于使用的 jQuery插件，可创造出极具个性的网页排版。</p>
<h3><a href="http://tutorialzine.com/2010/07/colortips-jquery-tooltip-plugin/" target="_blank">Colortip</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Colortip" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/11405551875157464.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="260" /></p>
<p>Colortip可转换你的页面元素的标题属性为一系列色彩丰富的提示（当你的鼠标移动到不同的标题上会出现不同颜色的字体文本提示）。支持六种色彩主题，这样你可更加容易融合到你的个人网页中去。</p>
<h3><a href="http://desandro.com/resources/jquery-masonry/" target="_blank">Masonry</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Masonry" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/11405562107186400.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="322" /></p>
<p>Masonry是一个 jQuery布局插件. 你可以将它看作CSS  floats的另一面。浮动元素的排列是先水平后垂直，Masonry排列内容是根据一个网格先垂直后水平的。</p>
<h3><a href="http://www.ivellios.toron.pl/technikalia/2010/06/22/gvchart-plugin-jquery-with-google-charts/" target="_blank">gvChart</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-gvChart" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/1140557987485006.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="204" /></p>
<p>gvChart是一个使用Google Charts了的jQuery插件，可通过HTML table  tag的数据实现交互可视化。它非常容易上手，此外它支持创建五种风格的图标。</p>
<h3><a href="http://www.mitya.co.uk/scripts/Animated-table-sort-REGEXP-friendly-111" target="_blank">Animated table sort</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-Animated-table-sort" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/1140558840421602.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="454" height="260" /></p>
<p>这是一个用于创建表格的jQuery插件，所创建的表格可以根据不同的列项目进行A-Z，升序排列，切换效果非常不错。</p>
<h3><a href="http://johnpatrickgiven.com/jquery/Image-Scale-Carousel/" target="_blank">jQuery Image Scale Carousel</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-jQuery-Image-Scale-Carousel" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/1140559359133979.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="292" /></p>
<p>网站图片保持完整的纵横比比什么都重要。这个jQuery插件可以完美地在slider展示你所有的图片，而不需担心产生变形。 <a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a>  Image Scale Carousel插件自动改变你所有图片到适合大小，一切都是那么的简单。</p>
<h3><a href="http://www.yoxigen.com/yoxview/" target="_blank">YoxView</a></h3>
<p><img title="Best-jQuery-Plugins-of-2010-YoxView" src="http://images.uheed.com/iwanna/2010/12/05/jquery-plugins/114056101224275730.jpg" alt="2010年最佳jQuery插件 | iwanna.cn 我想网" width="480" height="247" /></p>
<p>YoxView是一个免费的多媒体播放jQuery插件。它易于使用，功能丰富。你可以用它来展示各种媒体，如图像，视频，内嵌的内容，iframes，Flash等等。</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/12/05/6055/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/12/05/6055/#comments">1条评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/12/05/6055/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/12/05/6055/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/12/05/6055/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/12/05/6055/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery弹出层插件(tipsWindow 2.0)</title>
		<link>http://www.iwanna.cn/archives/2010/11/24/5920/</link>
		<comments>http://www.iwanna.cn/archives/2010/11/24/5920/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 15:50:42 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5920</guid>
		<description><![CDATA[关于插件： 一个基于jQuery的弹出层。支持拖拽，内容为文字，ID，图片，URL，框架； 2.0已重写代码。兼容性就测了IE和FF。其他的懒得去测了。这个版本已解决了IE6下不能Fixed定位的问题 参数JS代码里已作注释，这里不再复述；所有参数都为可选。就这么多了；有问题大家留言或发邮件给我！ 最新更新：(2010-11-22) 1.修复IE6下不能遮住下拉菜单的BUG 2.修复IE6下不能固定定位问题 详细的看演示页吧：http://www.iwanna.cn/examples/js/jquery-tipswindow/index.html © 我想网 Akon 所有 , 2010. &#124; 永久链接 &#124; 3 条评论 &#124; 提交到 Google Reader 鲜果 抓虾 Feed enhanced by Better Feed from Ozh]]></description>
			<content:encoded><![CDATA[<p><strong>关于插件：</strong><br />
一个基于jQuery的弹出层。支持拖拽，内容为文字，ID，图片，URL，框架；<br />
2.0已重写代码。兼容性就测了IE和FF。其他的懒得去测了。这个版本已解决了IE6下不能Fixed定位的问题<br />
参数JS代码里已作注释，这里不再复述；所有参数都为可选。就这么多了；有问题大家留言或发邮件给我！</p>
<p><strong>最新更新：(2010-11-22)</strong><br />
1.修复IE6下不能遮住下拉菜单的BUG<br />
2.修复IE6下不能固定定位问题</p>
<p>详细的看演示页吧：<a href="http://www.iwanna.cn/examples/js/jquery-tipswindow/index.html" target="_blank">http://www.iwanna.cn/examples/js/jquery-tipswindow/index.html</a></p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/11/24/5920/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/11/24/5920/#comments">3 条评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/11/24/5920/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/11/24/5920/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/11/24/5920/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/11/24/5920/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery Tools——不可错过的jQuery UI库</title>
		<link>http://www.iwanna.cn/archives/2010/11/21/5836/</link>
		<comments>http://www.iwanna.cn/archives/2010/11/21/5836/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 07:34:56 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5836</guid>
		<description><![CDATA[JQueryTools是 一组基于JQuery构建的用户界面常用组件的集合。通过使用jQueryTools，网站前端开发无疑会 变得更加高效。值得注意的是，jQueryTools的gzip压缩版本仅有5.8k，如此轻量级而且功能实用的UI组件绝对值得我们关注。下面是官方主页对它的一个描述： JqueryTools包含如今网站六个最有用的JavaScript工具。它的一个优点是所有这些工具可 以一起使用、扩展、配置和样式化。 最终，通过它你可以制作出众多不同的网站部件，或用个人的方式创造新的应用。 下面是JqueryUI包含的工具列表： 选项卡功能(Tabs) 提示工具条功能(ToolTips) 信 息滚动功能(Scrollable) 遮罩效果(overlay) 突出效果(expose) Flash 嵌入 表单验证（Validator） 范围选取（Rangeinput） 日期选择 （Dateinput） 以下分别是具体功能列表： 1、选项卡(Tabs) 效果图 Minimal setup for Tabs Naming the tabs 4 different skins with CSS Using mouseover to switch tabs Making Wizards with the Tabs Making Accordions with the Tabs Customizing the Accordion effect Horizontal Accordion [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flowplayer.org/tools/" target="_blank">JQueryTools</a>是 一组基于JQuery构建的用户界面常用组件的集合。通过使用jQueryTools，网站前端开发无疑会 变得更加高效。值得注意的是，jQueryTools的gzip压缩版本仅有5.8k，如此轻量级而且功能实用的UI组件绝对值得我们关注。下面是官方主页对它的一个描述：<br />
JqueryTools包含如今网站六个最有用的JavaScript工具。它的一个优点是所有这些工具可 以一起使用、扩展、配置和样式化。<br />
最终，通过它你可以制作出众多不同的网站部件，或用个人的方式创造新的应用。<br />
下面是JqueryUI包含的工具列表：</p>
<ol>
<li>选项卡功能(Tabs)</li>
<li>提示工具条功能(ToolTips)</li>
<li>信 息滚动功能(Scrollable)</li>
<li>遮罩效果(overlay)</li>
<li>突出效果(expose)</li>
<li>Flash 嵌入</li>
<li>表单验证（Validator）</li>
<li>范围选取（Rangeinput）</li>
<li>日期选择 （Dateinput）</li>
</ol>
<p><span id="more-5836"></span><br />
以下分别是具体功能列表：</p>
<h3><a rel="attachment wp-att-1248" href="http://www.iwanna.cn/?attachment_id=1248" target="_blank"><img title="tabs" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/tabs.jpg" alt="jQuery Tools——不可错过的jQuery UI库" width="673" height="229" /></a></h3>
<h3>1、选项卡(Tabs)</h3>
<p><a rel="attachment wp-att-1247" href="http://www.iwanna.cn/?attachment_id=1247" target="_blank"><img title="tabs1" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/tabs1.jpg" alt="jQuery Tools——不可错过的jQuery UI库" width="761" height="174" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/tabs/index.html" target="_blank">Minimal setup  for Tabs</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/anchors.html#second" target="_blank">Naming  the tabs</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/skins.html" target="_blank">4 different  skins with CSS</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/mouseover.html" target="_blank">Using  mouseover to switch tabs</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/wizard.html" target="_blank">Making Wizards  with the Tabs</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/accordion.html" target="_blank">Making  Accordions with the Tabs</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/accordion-custom.html" target="_blank">Customizing  the Accordion effect</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/accordion-horizontal.html" target="_blank">Horizontal  Accordion using the Tabs</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/multiple.html" target="_blank">Multiple  Tabs and Accordion instances</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/history.html" target="_blank">Handling  browsers back button</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/ajax.html" target="_blank">Loading tab  contents with AJAX</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/ajax-history.html" target="_blank">AJAX:ed  tabs with History support</a></li>
<li><a href="http://flowplayer.org/tools/demos/tabs/slideshow.html" target="_blank">Slideshow  plugin for the Tabs</a></li>
</ul>
<h3><a rel="attachment  wp-att-1250" href="http://www.iwanna.cn/?attachment_id=1250" target="_blank"><img title="tooltip" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/tooltip.jpg" alt="jQuery Tools——不可错过的jQuery UI库" width="680" height="243" /></a></h3>
<h3>2、提示工具条(ToolTips)</h3>
<p><a rel="attachment wp-att-1249" href="http://www.iwanna.cn/?attachment_id=1249" target="_blank"><img title="tooltip1" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/tooltip1.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="768" height="247" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/tooltip/index.html" target="_blank">Basics of  using the tooltip</a></li>
<li><a href="http://flowplayer.org/tools/demos/tooltip/any-html.html" target="_blank">Using any  HTML inside the tooltip</a></li>
<li><a href="http://flowplayer.org/tools/demos/tooltip/imitate.html" target="_blank">Imitating  browsers default tooltip</a></li>
<li><a href="http://flowplayer.org/tools/demos/tooltip/form.html" target="_blank">Using  tooltips in form fields</a></li>
<li><a href="http://flowplayer.org/tools/demos/tooltip/table.html" target="_blank">Using  tooltips in tables or lists</a></li>
<li><a href="http://flowplayer.org/tools/demos/tooltip/custom-effect.html" target="_blank">Custom  tooltip effect</a></li>
<li><a href="http://flowplayer.org/tools/demos/tooltip/dynamic.html" target="_blank">Dynamic  positioning of the tooltip</a></li>
</ul>
<h3><a rel="attachment wp-att-1242" href="http://www.iwanna.cn/?attachment_id=1242" target="_blank"><img title="overlays" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/overlays.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="714" height="237" /></a></h3>
<h3>3、遮罩效果(overlay)</h3>
<p><a rel="attachment wp-att-1241" href="http://www.iwanna.cn/?attachment_id=1241" target="_blank"><img title="overlays1" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/overlays1.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="832" height="540" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/overlay/index.html" target="_blank">Minimal  setup for overlay</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/apple.html" target="_blank">The Apple  effect for overlay</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/modal-dialog.html" target="_blank">Creating  modal dialogs with overlay</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/trigger.html" target="_blank">Opening  overlays programmatically</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/styling.html" target="_blank">Overlays  with different styles</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/external.html" target="_blank">Loading  external pages into overlay</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/multiple.html" target="_blank">Multiple  overlays on a same page</a></li>
<li><a href="http://flowplayer.org/tools/demos/overlay/custom-effect.html" target="_blank">Creating  a customized Overlay effect</a></li>
</ul>
<h3><a rel="attachment wp-att-1245" href="http://www.iwanna.cn/?attachment_id=1245" target="_blank"><img title="scrollable" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/scrollable.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="763" height="229" /></a></h3>
<h3>4、滚动效果(Scrollable)</h3>
<p><a rel="attachment wp-att-1246" href="http://www.iwanna.cn/?attachment_id=1246" target="_blank"><img title="scrollablea" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/scrollablea.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="766" height="151" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/scrollable/index.html" target="_blank">Minimal  setup for scrollable</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/vertical.html" target="_blank">A  vertical scrollable</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/gallery.html" target="_blank">A  simple scrollable image gallery</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/multiple-scrollables.html" target="_blank">Another  gallery with many scrollables</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/wizard.html" target="_blank">A  scrollable registration wizard</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/plugins/index.html" target="_blank">Scrollable  plugins in action</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/one-sized.html" target="_blank">Navigation  with browser’s back button</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/home.html" target="_blank">jQuery  Tools home page setup</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/site-navigation.html" target="_blank">A  complete scrollable navigational system</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/edit.html" target="_blank">Add and  remove items from scrollable</a></li>
<li><a href="http://flowplayer.org/tools/demos/scrollable/easing.html" target="_blank">Customizing  the scrolling animation</a></li>
</ul>
<h3><a rel="attachment wp-att-1237" href="http://www.iwanna.cn/?attachment_id=1237" target="_blank"><img title="expose" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/expose.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="676" height="233" /></a></h3>
<h3>5、突出效果(expose)</h3>
<p><a rel="attachment wp-att-1238" href="http://www.iwanna.cn/?attachment_id=1238" target="_blank"><img title="exposea" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/exposea.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="419" height="167" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/toolbox/expose/index.html" target="_blank">Minimal  setup for expose</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/expose/styling.html" target="_blank">Styling  the mask with a background image</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/expose/form.html" target="_blank">Exposing  a form</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/expose/video.html" target="_blank">Exposing  videos with a custom mask</a></li>
</ul>
<h3><a rel="attachment wp-att-1239" href="http://www.iwanna.cn/?attachment_id=1239" target="_blank"><img title="flash" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/flash.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="747" height="237" /></a></h3>
<h3>6、Flash嵌入</h3>
<p><a rel="attachment wp-att-1240" href="http://www.iwanna.cn/?attachment_id=1240" target="_blank"><img title="flasha" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/flasha.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="731" height="272" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/toolbox/flashembed/index.html" target="_blank">Basics  of Flash embedding</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/flashembed/jquery.html" target="_blank">Flashembed  and jQuery</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/flashembed/onclick.html" target="_blank">Loading  Flash on mouse click</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/flashembed/wmode.html" target="_blank">Placing  HTML on top of a Flash object</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/flashembed/fail.html" target="_blank">Handling  old Flash versions</a></li>
<li><a href="http://flowplayer.org/tools/demos/toolbox/flashembed/flowplayer.html" target="_blank">Flashembed  and Flowplayer</a></li>
</ul>
<h3><a rel="attachment  wp-att-1251" href="http://www.iwanna.cn/archives/2009/05/31/1253/google-chrome/" target="_blank"><img title="validator" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/validator.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="715" height="237" /></a></h3>
<h3>7、表单验证（Validator）</h3>
<p><a rel="attachment wp-att-1252" href="http://www.iwanna.cn/?attachment_id=1252" target="_blank"><img title="validatora" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/validatora.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="459" height="352" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/validator/index.html" target="_blank">Minimal  setup for Validator</a></li>
<li><a href="http://flowplayer.org/tools/demos/validator/custom-validators.html" target="_blank">Custom  input types and attributes</a></li>
<li><a href="http://flowplayer.org/tools/demos/validator/server-side.html" target="_blank">Combined  server and client-side validation</a></li>
<li><a href="http://flowplayer.org/tools/demos/validator/custom-effect.html" target="_blank">Displaying  all errors inside a single DIV</a></li>
<li><a href="http://flowplayer.org/tools/demos/validator/events.html" target="_blank">Validator  events in action</a></li>
<li><a href="http://flowplayer.org/tools/demos/validator/localize.html" target="_blank">Localizing  the Validator (finnish)</a></li>
</ul>
<h3><a rel="attachment wp-att-1243" href="http://www.iwanna.cn/?attachment_id=1243" target="_blank"><img title="range" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/range.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="736" height="218" /></a></h3>
<h3>8、范围选取（Rangeinput）</h3>
<p><a rel="attachment wp-att-1244" href="http://www.iwanna.cn/?attachment_id=1244" target="_blank"><img title="rangea" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/rangea.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="759" height="92" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/rangeinput/index.html" target="_blank">Minimal  setup for rangeinput</a></li>
<li><a href="http://flowplayer.org/tools/demos/rangeinput/vertical.html" target="_blank">A  couple of vertical ranges</a></li>
<li><a href="http://flowplayer.org/tools/demos/rangeinput/multiple.html" target="_blank">Multiple  small ranges</a></li>
<li><a href="http://flowplayer.org/tools/demos/rangeinput/scrollbar.html" target="_blank">A  custom scrollbar for a DIV</a></li>
</ul>
<h3><a rel="attachment wp-att-1236" href="http://www.iwanna.cn/?attachment_id=1236" target="_blank"><img title="date" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/date.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="693" height="247" /></a></h3>
<h3>9、日期选择（Dateinput）</h3>
<p><a rel="attachment wp-att-1234" href="http://www.iwanna.cn/?attachment_id=1234" target="_blank"><img title="datea" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/datea.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="611" height="278" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/dateinput/index.html" target="_blank">Minimal  setup for Dateinput</a></li>
<li><a href="http://flowplayer.org/tools/demos/dateinput/large-skin.html" target="_blank">A  large skin for Dateinput</a></li>
<li><a href="http://flowplayer.org/tools/demos/dateinput/customize.html" target="_blank">Customizing  Dateinput behaviour</a></li>
<li><a href="http://flowplayer.org/tools/demos/dateinput/flight.html" target="_blank">Prompting  for start and end dates</a></li>
<li><a href="http://flowplayer.org/tools/demos/dateinput/static.html" target="_blank">Calendar  that is always visible</a></li>
<li><a href="http://flowplayer.org/tools/demos/dateinput/localize.html" target="_blank">Localizing  the Dateinput (french)</a></li>
</ul>
<h3>10、 综合运用（Combinations）</h3>
<p><a rel="attachment  wp-att-1235" href="http://www.iwanna.cn/?attachment_id=1235" target="_blank"><img title="combinationa" src="http://images.uheed.com/iwanna/2010/11/21/jquery-tools/combinationa.jpg" alt="jQuery Tools——不可错过的jQuery UI库 | iwanna.cn 我想网" width="746" height="519" /></a></p>
<p>效果图</p>
<ul>
<li><a href="http://flowplayer.org/tools/demos/combine/html5-form/index.html" target="_blank">HTML5  form inside an overlay</a></li>
<li><a href="http://flowplayer.org/tools/demos/combine/portfolio/index.html" target="_blank">An  artist’s portfolio</a></li>
<li><a href="http://flowplayer.org/tools/demos/combine/portfolio/preload.html" target="_blank">Speeding  up the portfolio</a></li>
</ul>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/11/21/5836/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/11/21/5836/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/11/21/5836/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/11/21/5836/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/11/21/5836/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/11/21/5836/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>提供 39种样式高亮语法的JQuery插件-Snippet</title>
		<link>http://www.iwanna.cn/archives/2010/11/14/5776/</link>
		<comments>http://www.iwanna.cn/archives/2010/11/14/5776/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 07:51:04 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[JQuery插件]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5776</guid>
		<description><![CDATA[Snippet jQuery Syntax Highlighter 是一个建立在SHJS的 开源插件,Snippet提供了简单而且快捷的方法,可以方便的为你带来高亮语法的提示.可以在IE 6, IE 7, IE 8, FF 3.6, Chrome 6.0, Safari 5.0, Opera 10.62中运行. 先简单为你讲一讲它的用法.在官方的网站也已经有了详细的介绍,这里就稍微翻译一下它所提供的例子. 1.  在你的HTML中加载Snippet和JQuery &#60;script type="text/javascript" src="js/jquery.js"&#62;&#60;/script&#62; &#60;script type="text/javascript" src="js/jquery.snippet.js"&#62;&#60;/script&#62; 2.  加载Snippet的CSS &#60;link rel="stylesheet" type="text/css" href="css/jquery.snippet.css" /&#62; 3.  重点是这一步,我们要把下面的代码写在&#60;script&#62;标记中,让Snippet对&#60;pre&#62;标记进行操作 $(document).ready(function(){ $("pre.htmlCode").snippet("html"); // 找到类名为htmlCode的&#60;pre&#62;标签 // 并且以HTML语法来高亮显示它 $("pre.styles").snippet("css",{style:"greenlcd"}); // 找到类名为styles的&#60;pre&#62;标签 // 并且以CSS语法来高亮显示它 // 显示的类型为greenlcd $("pre.js").snippet("javascript",{style:"random",transparent:true,showNum:false}); // 找到类名为js的&#60;pre&#62;标签 //并且以JavaScript语法来高亮显示它 // [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Snippet jQuery Syntax Highlighter" href="http://steamdev.com/snippet/" target="_blank">Snippet jQuery  Syntax Highlighter</a> 是一个建立在<a title="Syntax Highlighting in  JavaScript" href="http://shjs.sourceforge.net/" target="_blank">SHJS</a>的 开源插件,Snippet提供了简单而且快捷的方法,可以方便的为你带来高亮语法的提示.可以在IE 6, IE 7, IE 8, FF 3.6,  Chrome 6.0, Safari 5.0, Opera 10.62中运行.</p>
<p><a href="http://www.gooosen.com/wp-content/uploads/2010/11/snippet-jquery.jpg"><img title="snippet-jquery" src="http://www.gooosen.com/wp-content/uploads/2010/11/snippet-jquery.jpg" alt="" width="479" height="320" /></a><br />
先简单为你讲一讲它的用法.在官方的网站也已经有了详细的介绍,这里就稍微翻译一下它所提供的例子.<br />
<span id="more-5776"></span><br />
1.  在你的HTML中加载Snippet和JQuery</p>
<div>
<pre>
<ol>
<li>&lt;script type="text/<a href="http://www.iwanna.cn/tags/javascript/" class="st_tag internal_tag" rel="tag" title="标签 JavaScript 下的日志">javascript</a>" src="js/<a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jquery</a>.js"&gt;&lt;/script&gt;</li>
<li>&lt;script type="text/javascript" src="js/jquery.snippet.js"&gt;&lt;/script&gt;</li>
</ol>
</pre>
</div>
<p>2.  加载Snippet的CSS</p>
<div>
<pre>
<ol>
<li>&lt;link rel="stylesheet" type="text/css" href="css/jquery.snippet.css" /&gt;</li>
</ol>
</pre>
</div>
<p>3.  重点是这一步,我们要把下面的代码写在&lt;script&gt;标记中,让Snippet对&lt;pre&gt;标记进行操作</p>
<div>
<pre>
<ol>
<li>$(document).ready(function(){</li>
<li>$("pre.htmlCode").snippet("html");</li>
<li>// 找到类名为htmlCode的&lt;pre&gt;标签</li>
<li>// 并且以HTML语法来高亮显示它</li>
<li>$("pre.styles").snippet("css",{style:"greenlcd"});</li>
<li>// 找到类名为styles的&lt;pre&gt;标签</li>
<li>// 并且以CSS语法来高亮显示它</li>
<li>// 显示的类型为greenlcd</li>
<li>$("pre.js").snippet("javascript",{style:"random",transparent:true,showNum:false});</li>
<li>// 找到类名为js的&lt;pre&gt;标签</li>
<li>//并且以JavaScript语法来高亮显示它</li>
<li>// 显示的类型为在39中随机选择</li>
<li>// 选择背景为透明</li>
<li>// 不显示行号</li>
<li>});</li>
</ol>
</pre>
</div>
<p>4.  可以动态更新你的Snippet</p>
<div>
<pre>
<ol>
<li>$(document).ready(function(){</li>
<li>$("pre#dynamic").snippet("php",{style:"navy",showNum:false});</li>
<li>// 找到类名为js的&lt;pre&gt;标签并把类型选为navy</li>
<li>// 隐藏行号</li>
<li>$("pre#dynamic").click(function(){</li>
<li>$(this).snippet({style:"vampire",transparent:true,showNum:true});</li>
<li>// 改变snippet的类型为vampire</li>
<li>// 改变背景为透明</li>
<li>// 显示行号</li>
<li>});</li>
<li>});</li>
</ol>
</pre>
</div>
<p>关于更多的参数可以在Snippet的网站的找到,这里就不多说了.总之Snippet是一个比较全面的而且很好用的显示高亮代码的插件,有兴趣的 话,你也可以下来试试.下载地址和例子点<a href="http://steamdev.com/snippet/" target="_blank">这里</a>.</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/11/14/5776/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/11/14/5776/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/11/14/5776/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/11/14/5776/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/11/14/5776/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/11/14/5776/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10个强大的Ajax jQuery文件上传程序</title>
		<link>http://www.iwanna.cn/archives/2010/11/07/5734/</link>
		<comments>http://www.iwanna.cn/archives/2010/11/07/5734/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 15:55:03 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5734</guid>
		<description><![CDATA[上传文件和图片是许多网站的一个常用功能，无论是让注册用户上传一个个人资料图片还是上传文件共享，都离不开上传程序，虽然有很多种实现方法，但要 让上传看起来更酷一点，如显示剩余时间，同时上传多个文件，以及使用拖放式操作，或上传功能更稳定一点，也许你就没招了，没关系，本文就为你介绍10个功 能强大，易于使用的Ajax jQuery文件上传程序，注意有些除了使用Ajax jQuery外，还结合了其它技术，如Flash。 1、 Valums AJAX Uploader 2、 Plupload 3、 Uploadify 4、AJAX Multiple File Upload Form using jQuery 5、jQuery AJAX File Upload 6、jQuery Upload Progress 7、jQuery Multiple File Upload Plugin 8、Digitalarld Swiff AJAX Uploader 9、jQUploader 10、AJAX File Upload © 我想网 Akon 所有 , 2010. &#124; 永久链接 &#124; 没有评论 &#124; 提交到 Google Reader 鲜果 [...]]]></description>
			<content:encoded><![CDATA[<p>上传文件和图片是许多网站的一个常用功能，无论是让注册用户上传一个个人资料图片还是上传文件共享，都离不开上传程序，虽然有很多种实现方法，但要 让上传看起来更酷一点，如显示剩余时间，同时上传多个文件，以及使用拖放式操作，或上传功能更稳定一点，也许你就没招了，没关系，本文就为你介绍10个功 能强大，易于使用的Ajax jQuery文件上传程序，注意有些除了使用Ajax jQuery外，还结合了其它技术，如Flash。</p>
<p><strong><a href="http://valums.com/ajax-upload/" target="_blank">1、 Valums AJAX Uploader</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image002.jpg"><img title="clip_image002" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image002_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 002" width="244" height="124" /></a><br />
<span id="more-5734"></span><br />
<strong> </strong></p>
<p><strong><a href="http://www.plupload.com/" target="_blank">2、 Plupload</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image004.jpg"><img title="clip_image004" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image004_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 004" width="244" height="124" /></a></p>
<p><strong><a href="http://www.uploadify.com/" target="_blank">3、 Uploadify</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image006.jpg"><img title="clip_image006" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image006_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 006" width="244" height="124" /></a></p>
<p><strong><a href="http://webdeveloperplus.com/jquery/ajax-multiple-file-upload-form-using-jquery/" target="_blank">4、AJAX Multiple File Upload Form using jQuery</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image008.jpg"><img title="clip_image008" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image008_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 008" width="244" height="178" /></a></p>
<p><strong><a href="http://cool-javascripts.com/jquery/jquery-ajax-file-upload.html" target="_blank">5、jQuery AJAX File Upload</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image010.jpg"><img title="clip_image010" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image010_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 010" width="244" height="82" /></a></p>
<p><strong><a href="http://nixbox.com/demos/jquery-uploadprogress.php" target="_blank">6、jQuery Upload Progress</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image012.jpg"><img title="clip_image012" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image012_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 012" width="244" height="124" /></a></p>
<p><strong><a href="http://www.fyneworks.com/jquery/multiple-file-upload/#" target="_blank">7、jQuery Multiple File Upload Plugin</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image014.jpg"><img title="clip_image014" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image014_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 014" width="244" height="124" /></a></p>
<p><strong><a href="http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/" target="_blank">8、Digitalarld Swiff AJAX Uploader</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image016.jpg"><img title="clip_image016" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image016_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 016" width="244" height="124" /></a></p>
<p><strong><a href="http://pixeline.be/experiments/jqUploader/test.php" target="_blank">9、jQUploader</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image018.jpg"><img title="clip_image018" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image018_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 018" width="244" height="124" /></a></p>
<p><strong><a href="http://www.phpletter.com/Demo/AjaxFileUpload-Demo/" target="_blank">10、AJAX File Upload</a></strong></p>
<p><a href="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image020.jpg"><img title="clip_image020" src="http://images.uheed.com/iwanna/2010/11/07/ajax-jquery/clip_image020_thumb.jpg" border="0" alt="10个强大的Ajax jQuery文件上传程序 | iwanna.cn 我想网 020" width="244" height="124" /></a></p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/11/07/5734/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/11/07/5734/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/11/07/5734/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/11/07/5734/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/11/07/5734/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/11/07/5734/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>14个有用的Jquery技巧</title>
		<link>http://www.iwanna.cn/archives/2010/10/17/5585/</link>
		<comments>http://www.iwanna.cn/archives/2010/10/17/5585/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 13:24:52 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5585</guid>
		<description><![CDATA[1.通过方法返回Jquery对象实例 用 var someDiv = $(‘#someDiv’).hide();  代替 var someDiv = $(‘#someDiv’);  someDiv.hide(); 2.使用find来查找 用 $(’#someDiv’).find(’p.someClass’).hide();   代替 $(’#someDiv p.someClass’).hide();因为可以不必触发Jquery的Sizzle引擎，同时在写选择符的时候尽量让您的选择符简单同时优化最右边 的选择符 3.不要滥用$(this) 用 $(’#someAnchor’).click(function() {  alert( this.id );  }); 代替 $(’#someAnchor’).click(function() {alert($(this).attr(’id’));}); 4.ready的简写形式 用 $(function() { }); 代替 $(document).ready(function() {}); 5.让你的代码安全 方法1（使用noConflict） var j = jQuery.noConflict(); j(’#someDiv’).hide(); // The line below will reference some other library’s $ function. $(’someDiv’).style.display = ‘none’; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1.通过方法返回Jquery对象实例</strong><br />
用 var someDiv = $(‘#someDiv’).hide();   代替 var someDiv = $(‘#someDiv’);   someDiv.hide();</p>
<p><strong>2.使用find来查找</strong><br />
用 $(’#someDiv’).find(’p.someClass’).hide();   代替 $(’#someDiv  p.someClass’).hide();因为可以不必触发Jquery的Sizzle引擎，同时在写选择符的时候尽量让您的选择符简单同时优化最右边 的选择符</p>
<p><strong>3.不要滥用$(this)</strong><br />
用 $(’#someAnchor’).click(function() {  alert( this.id );  }); 代替  $(’#someAnchor’).click(function() {alert($(this).attr(’id’));});</p>
<p><strong>4.ready的简写形式</strong><br />
用 $(function() { }); 代替 $(document).ready(function() {});<br />
<span id="more-5585"></span><br />
<strong>5.让你的代码安全</strong><br />
方法1（使用noConflict）<br />
var j = <a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a>.noConflict();<br />
j(’#someDiv’).hide();<br />
// The line below will reference some other library’s $ function.<br />
$(’someDiv’).style.display = ‘none’;<br />
方法2（传入参数Jquery）<br />
(function($) {<br />
// Within this function, $ will always refer to jQuery<br />
})(jQuery);<br />
方法3（通过ready方法）<br />
jQuery(document).ready(function($) {<br />
// $ refers to jQuery<br />
});</p>
<p><strong>6.简化代码</strong><br />
用each代替for，使用数组保存临时变量，使用document fragment，这其实和写原生的Javascript需要注意的一样。</p>
<p><strong>7.使用Ajax的方法</strong><br />
Jquery提供了get getJSON post ajax这些有用的ajax方法</p>
<p><strong>8.访问原生的属性和方法</strong><br />
比如获取元素id的方法有<br />
// OPTION 1 &#8211; Use jQuery<br />
var id = $(’#someAnchor’).attr(’id’);<br />
// OPTION 2 &#8211; Access the DOM element<br />
var id = $(’#someAnchor’)[0].id;<br />
// OPTION 3 &#8211; Use jQuery’s get method<br />
var id = $(’#someAnchor’).get(0).id;<br />
// OPTION 3b &#8211; Don’t pass an index to get<br />
anchorsArray = $(’.someAnchors’).get();<br />
var thirdId = anchorsArray[2].id;</p>
<p><strong>9.使用PHP来检查Ajax请求</strong><br />
通过使用xhr.setRequestHeader(”X-Requested-With”, “XMLHttpRequest”);   服务器端如PHP就可以通过<br />
function isXhr() {<br />
return $_SERVER['HTTP_X_REQUESTED_WITH'] === ‘XMLHttpRequest’;<br />
}<br />
来检查是不是Ajax请求，在一些禁用Javascript的情况下可能会用到</p>
<p><strong>10.Jquery和$的关系</strong><br />
在Jquery代码的最下面，可以看到下面的代码<br />
window.jQuery = window.$ = jQuery;  $其实就是Jquery的一个shortcut</p>
<p><strong>11.条件加载Jquery</strong><br />
&lt;!– Grab Google CDN jQuery. fall back to local if necessary –&gt;<br />
&lt;script  src=”http://<a href="http://www.iwanna.cn/tags/ajax/" class="st_tag internal_tag" rel="tag" title="标签 Ajax 下的日志">ajax</a>.googleapis.com/<a href="http://www.iwanna.cn/tags/ajax/" class="st_tag internal_tag" rel="tag" title="标签 Ajax 下的日志">ajax</a>/libs/jquery/1.4.2/jquery.min.js”&gt;&lt;/script&gt;<br />
&lt;script&gt;!window.jQuery &amp;&amp; document.write(’&lt;script  src=”js/jquery-1.4.2.min.js”&gt;&lt;\/script&gt;’)&lt;/script&gt;<br />
如果CDN没有下载到Jquery，则从本地读取</p>
<p><strong>12.Jquery Filters</strong><br />
&lt;script&gt;<br />
$(’p:first’).data(’info’, ‘value’); // populates $’s data object to have  something to work with<br />
$.extend(<br />
jQuery.expr[":"], {<br />
block: function(elem) {<br />
return $(elem).css(”display”) === “block”;<br />
},<br />
hasData : function(elem) {<br />
return !$.isEmptyObject( $(elem).data() );<br />
}<br />
}<br />
);<br />
$(”p:hasData”).text(”has data”); // grabs paras that have data attached<br />
$(”p:block”).text(”are block level”); // grabs only paragraphs that have  a display of “block”<br />
&lt;/script&gt;<br />
注：$.expr[":"]等价于$.expr.filters</p>
<p><strong>13.hover方法</strong><br />
$(’#someElement’).hover(function() {<br />
//在这里可以使用toggle方法来实现滑过和滑出的效果<br />
});</p>
<p><strong>14.传入属性对象</strong><br />
当创建一个元素的时候，Jquery1.4可以传入一个属性对象<br />
$(’&lt;/a&gt;’, {<br />
id : ’someId’,<br />
className : ’someClass’,<br />
href : ’somePath.html’<br />
});<br />
甚至是Jquery指定的属性或事件如text, click</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/10/17/5585/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/10/17/5585/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/10/17/5585/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/10/17/5585/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/10/17/5585/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/10/17/5585/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery教程之鼠标事件篇</title>
		<link>http://www.iwanna.cn/archives/2010/10/03/5479/</link>
		<comments>http://www.iwanna.cn/archives/2010/10/03/5479/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 13:22:41 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[程序源码]]></category>
		<category><![CDATA[Source-code]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5479</guid>
		<description><![CDATA[jQuery除了选择器之外，还封装了很多事件的处理，比如鼠标事件，所谓 的鼠标事件是指用户在移动鼠标光标或者点击任意鼠标键而触发的事件，jQuery中封装了几乎所有的鼠标事件，包括点击，双击，移出，移入等鼠标事件，下 面断桥残雪简单的介绍下jQuery的鼠标事件 jQuery的click事件 经典鼠标click的实例： $("sel").click(function(){ alert('哈哈 !'); }); jQuery的dbclick事件 一般dbclick事件的同时也会触发两次click事件。。以前我写过一篇博客简单的介绍了下jQuery的鼠标双击事件 $('p').dbclick(function(){ alert('鼠标双击!'); }); $('p').click(function(){ alert('点击了一下!'); });//大家看看结果是怎么样的？ jQuery的mousedown事件 mousedown就是在按下鼠标时触发的事件 $(’p&#8217;).mousedown(function(){ alert(’按下了鼠标 !’); }); jQuery的mouseup事件 同上就是松开鼠标时候触发的事件,如果在于按下鼠标的相同元素上松开,那么也会触发click事件,mousedown和mouseup事件一般有 在div拖拽等效果中 $('p').mouseup(function(){ alert('鼠标起来了 !'); }).click(function(){ alert('点击了下鼠标!'); }); jQuery的mouseover事件 mouseover事件于用户把鼠标从一个元素移动到另外一个元素上时触发，如果需要知道来自那个元素可以使用，relatedTagrget属性 jQuery的mouseout事件 mouseout事件于用户把鼠标移出一个元素时触发，这包括从父元素移动到子元素上，或者使用键盘跳到元素上。 jQuery的mouseenter事件 和mouseover事件类似,但两者有区别 jQuery的mouserleaver事件 同上和mouseout事件类似. hover事件 其实hover事件内部就是使用了mouseenter和mouseleaver事件,我们可以使用jQuery的hover这个函数来代替上面的 两个函数 $('p').hover(function(){ alert('这个function里放mouseenter 的事件!'); },function(){ alert('这里是mouseleaver function!'); }); 这里我们没有鼠标右键事件?其实使用jQuery的mousedown事件然后再函数里判断就OK了 © 我想网 Akon 所有 [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery除了<strong>选择器</strong>之外，还封装了很多事件的处理，比如<strong>鼠标事件</strong>，所谓 的鼠标事件是指用户在移动鼠标光标或者点击任意鼠标键而触发的事件，jQuery中封装了几乎所有的鼠标事件，包括点击，双击，移出，移入等鼠标事件，下 面断桥残雪简单的介绍下<strong>jQuery的鼠标事件</strong></p>
<h3>jQuery的click事件</h3>
<p>经典鼠标click的实例：</p>
<pre>$("sel").click(function(){
    alert('哈哈 !');
});</pre>
<p><span id="more-5479"></span></p>
<h3>jQuery的dbclick事件</h3>
<p>一般dbclick事件的同时也会触发两次click事件。。以前我写过一篇博客简单的介绍了下<a href="http://www.js8.in/610.html" target="_blank">jQuery的鼠标双击事件</a></p>
<pre>$('p').dbclick(function(){
alert('鼠标双击!');
});
$('p').click(function(){
alert('点击了一下!');
});//大家看看结果是怎么样的？</pre>
<h3>jQuery的mousedown事件</h3>
<p>mousedown就是在按下鼠标时触发的事件<br />
$(’p&#8217;).mousedown(function(){<br />
alert(’按下了鼠标 !’);<br />
});</p>
<h3>jQuery的mouseup事件</h3>
<p>同上就是松开鼠标时候触发的事件,如果在于按下鼠标的相同元素上松开,那么也会触发click事件,mousedown和mouseup事件一般有 在div拖拽等效果中</p>
<pre>$('p').mouseup(function(){
alert('鼠标起来了 !');
}).click(function(){
alert('点击了下鼠标!');
});</pre>
<h3>jQuery的mouseover事件</h3>
<p>mouseover事件于用户把鼠标从一个元素移动到另外一个元素上时触发，如果需要知道来自那个元素可以使用，relatedTagrget属性</p>
<h3>jQuery的mouseout事件</h3>
<p>mouseout事件于用户把鼠标移出一个元素时触发，这包括从父元素移动到子元素上，或者使用键盘跳到元素上。</p>
<h3>jQuery的mouseenter事件</h3>
<p>和mouseover事件类似,但两者有区别</p>
<h3>jQuery的mouserleaver事件</h3>
<p>同上和mouseout事件类似.</p>
<h3>hover事件</h3>
<p>其实hover事件内部就是使用了mouseenter和mouseleaver事件,我们可以使用jQuery的hover这个函数来代替上面的 两个函数</p>
<pre>$('p').hover(function(){
alert('这个function里放mouseenter 的事件!');
},function(){
alert('这里是mouseleaver function!');
});</pre>
<p>这里我们没有鼠标右键事件?其实使用jQuery的<strong>mousedown</strong>事件然后再函数里判断就OK了</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/10/03/5479/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/10/03/5479/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/10/03/5479/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/10/03/5479/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/10/03/5479/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/10/03/5479/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>25个jQuery的编程小抄[速查表]</title>
		<link>http://www.iwanna.cn/archives/2010/09/20/5352/</link>
		<comments>http://www.iwanna.cn/archives/2010/09/20/5352/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 16:36:34 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Cheat-Sheets]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5352</guid>
		<description><![CDATA[这里是25个jQuery的 小抄（有一些在墙外），有的还可以设置成你的电脑桌面。这些东西可以让你很快速地记得一些常用的东西，就好像软件的快捷键一样。希望它们对你会有帮助。 1. jQuery 1.2 Cheat-sheet [PNG] 2. jQuery 1.2 Cheat Sheet v1.0 [PDF] 3. jQuery 1.3 Cheatsheet [PDF] 4. jQuery API Browser [Adobe AIR, HTML] 5. jQuery1.1 Cheat Sheet [HTML] 6. jTouch – jQuery Cheat Sheet for iPhone [HTML] 7. jQuery 1.4 API Cheat Sheet [HTML, PDF, PNG] 8. jQuery Selectors [PDF] 9. jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>这里是25个jQuery的 小抄（有一些在墙外），有的还可以设置成你的电脑桌面。这些东西可以让你很快速地记得一些常用的东西，就好像软件的快捷键一样。希望它们对你会有帮助。</p>
<h3><a href="http://colorcharge.com/jquery/" target="_blank">1. jQuery  1.2 Cheat-sheet</a> [PNG]</h3>
<p><a href="http://colorcharge.com/jquery/" target="_blank"><img title="1" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/1.png" alt="" width="550" height="377" /></a><br />
<span id="more-5352"></span></p>
<h3><a href="http://www.gscottolson.com/weblog/2008/01/11/jquery-cheat-sheet/" target="_blank">2.  jQuery 1.2 Cheat Sheet v1.0</a> [PDF]</h3>
<p><a href="http://www.gscottolson.com/weblog/2008/01/11/jquery-cheat-sheet/" target="_blank"><img title="2" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/2.png" alt="" width="550" height="374" /></a></p>
<h3><a href="http://blog.acodingfool.com/cheatsheets/jquery-1-3-cheatsheet/" target="_blank">3.  jQuery 1.3 Cheatsheet</a> [PDF]</h3>
<p><a href="http://blog.acodingfool.com/cheatsheets/jquery-1-3-cheatsheet/" target="_blank"><img title="3" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/32.jpg" alt="" width="550" height="636" /></a></p>
<h3><a href="http://api.jquery.com/" target="_blank">4. jQuery API  Browser</a> [Adobe AIR, HTML]</h3>
<p><a href="http://api.jquery.com/" target="_blank"><img title="4" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/42.jpg" alt="" width="550" height="151" /></a></p>
<h3>5. <a href="http://n-bp.com/jquery_cheat_sheet/v11/" target="_blank">jQuery1.1  Cheat Sheet</a> [HTML]</h3>
<p><a href="http://n-bp.com/jquery_cheat_sheet/v11/" target="_blank"><img title="5" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/52.jpg" alt="" width="550" height="358" /></a></p>
<h3>6. <a href="http://jtouch.colorcharge.com/" target="_blank">jTouch –  jQuery Cheat Sheet for iPhone</a> [HTML]</h3>
<p><a href="http://jtouch.colorcharge.com/" target="_blank"><img title="6" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/62.jpg" alt="" width="550" height="189" /></a></p>
<h3>7.<a href="http://www.futurecolors.ru/jquery/" target="_blank"> jQuery 1.4 API Cheat Sheet</a> [HTML, PDF, PNG]</h3>
<p><a href="http://www.futurecolors.ru/jquery/" target="_blank"><img title="7" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/7.jpg" alt="" width="550" height="189" /></a></p>
<h3>8. <a href="http://refcardz.dzone.com/refcardz/jquery-selectors" target="_blank">jQuery  Selectors</a> [PDF]</h3>
<p><a href="http://refcardz.dzone.com/refcardz/jquery-selectors" target="_blank"><img title="8" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/82.jpg" alt="" width="550" height="189" /></a></p>
<h3>9.<a href="http://oscarotero.com/jquery/" target="_blank"> jQuery  1.3 Quick API Reference</a> [ HTML]</h3>
<p><a href="http://oscarotero.com/jquery/" target="_blank"><img title="9" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/9.png" alt="" width="550" height="343" /></a></p>
<h3>10.<a href="http://oscarotero.com/jquery/ui.html" target="_blank"> </a><a href="http://oscarotero.com/jquery/ui.html" target="_blank">jQuery UI  1.7 Quick API Reference</a> [ HTML]</h3>
<p><a href="http://oscarotero.com/jquery/ui.html" target="_blank"><img title="10" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/102.jpg" alt="" width="550" height="189" /></a></p>
<h3>11. <a href="http://www.javascripttoolbox.com/jquery/cheatsheet/" target="_blank">jQuery 1.3.2  Cheat Sheet</a> [Microsoft Excel (XLS), PDF, PNG]</h3>
<p><a href="http://www.javascripttoolbox.com/jquery/cheatsheet/" target="_blank"><img title="11" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/112.jpg" alt="" width="550" height="189" /></a></p>
<h3>12. <a href="http://www.javascripttoolbox.com/jquery/cheatsheet/" target="_blank">jQuery 1.1.3  Cheat Sheet</a> [Microsoft Excel (XLS), PDF, PNG]</h3>
<p><a href="http://www.javascripttoolbox.com/jquery/cheatsheet/" target="_blank"><img title="12" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/12.gif" alt="" width="550" height="426" /></a></p>
<h3>13. <a href="http://woork.blogspot.com/2009/09/jquery-visual-cheat-sheet.html" target="_blank">jQuery  1.3 Visual Cheat Sheet</a> [PDF]</h3>
<p><a href="http://woork.blogspot.com/2009/09/jquery-visual-cheat-sheet.html" target="_blank"><img title="13" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/13.jpg" alt="" width="550" height="389" /></a></p>
<h3>14.<a href="http://woorkup.com/2010/06/13/jquery-1-4-2-visual-cheat-sheet/" target="_blank"> jQuery 1.4.2 Visual Cheat Sheet</a> [JPEG, PDF]</h3>
<p><a href="http://woorkup.com/2010/06/13/jquery-1-4-2-visual-cheat-sheet/" target="_blank"><img title="14" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/14.jpg" alt="" width="550" height="579" /></a></p>
<h3>15. <a href="http://remysharp.com/jquery-api/" target="_blank">jQuery  API</a> [HTML]</h3>
<p><a href="http://remysharp.com/jquery-api/" target="_blank"><img title="15" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/15.jpg" alt="" width="550" height="189" /></a></p>
<h3>16. <a href="http://labs.impulsestudios.ca/jquery-cheat-sheet" target="_blank">jQuery 1.4 Cheat  Sheet</a> [PDF]</h3>
<p><a href="http://labs.impulsestudios.ca/jquery-cheat-sheet" target="_blank"><img title="16" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/16.jpg" alt="" width="550" height="189" /></a></p>
<h3>17.<a href="http://chris4403.blogspot.com/2008/01/jquery-cheatsheet-wallpaper.html" target="_blank"> jQuery cheatsheet Wallpaper</a></h3>
<p><a href="http://chris4403.blogspot.com/2008/01/jquery-cheatsheet-wallpaper.html" target="_blank"><img title="17" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/17.jpg" alt="" width="550" height="189" /></a></p>
<h3>18. <a href="http://carlos.bueno.org/jq-yui.html" target="_blank">jQuery  – YUI3 Rosetta Stone</a> [HTML]</h3>
<p><a href="http://carlos.bueno.org/jq-yui.html" target="_blank"><img title="18" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/18.jpg" alt="" width="550" height="247" /></a></p>
<h3>19. <a href="http://www.cheat-sheets.org/#jQuery" target="_blank">jQuery  1.2 by Adrien Gibrat</a> [PDF]</h3>
<p><a href="http://www.cheat-sheets.org/#jQuery" target="_blank"><img title="19" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/19.jpg" alt="" width="550" height="255" /></a></p>
<h3>20. <a href="http://acodingfool.typepad.com/blog/2009/01/jquery-13-cheat-sheet.html" target="_blank">jQuery  1.3 Cheat Sheet</a></h3>
<p><a href="http://acodingfool.typepad.com/blog/2009/01/jquery-13-cheat-sheet.html" target="_blank"><img title="20" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/20.jpg" alt="" width="550" height="336" /></a></p>
<h3>21. <a href="http://www.gmtaz.com/index.php/jquery-13-cheatsheet-wallpaper/" target="_blank">jQuery  1.3 Cheatsheet Wallpaper </a>[1920×1200, 1680×1050 and 1440×900]</h3>
<p><a href="http://www.gmtaz.com/index.php/jquery-13-cheatsheet-wallpaper/" target="_blank"><img title="21" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/211.jpg" alt="" width="550" height="189" /></a></p>
<h3><a href="http://www.cheat-sheets.org/saved-copy/jQuery.1.3.Visual.Cheat.Sheet.by.WOORK.pdf" target="_blank">22.  jQuery 1.3 Visual Cheat Sheet by Antonio Lupetti</a> [PDF]</h3>
<p><a href="http://www.cheat-sheets.org/saved-copy/jQuery.1.3.Visual.Cheat.Sheet.by.WOORK.pdf" target="_blank"><img title="22" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/22.jpg" alt="" width="550" height="378" /></a></p>
<h3><a href="http://codylindley.com/jqueryselectors/" target="_blank">23.  jQuery Selectors Cheatsheet</a> [HTML]</h3>
<p><a href="http://codylindley.com/jqueryselectors/" target="_blank"><img title="23" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/23.jpg" alt="" width="550" height="189" /></a></p>
<h3><a href="http://jn.orz.hm/jquery/ui_effect.html" target="_blank">24.  jQuery UI – Effects Cheatsheet</a> [HTML]</h3>
<p><a href="http://jn.orz.hm/jquery/ui_effect.html" target="_blank"><img title="24" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/24.jpg" alt="" width="550" height="189" /></a></p>
<h3>25. <a href="http://elegantcode.com/wp-content/uploads/2010/03/Jquery-Validator-Cheat-sheet.pdf" target="_blank">jQuery  Validator Cheatsheet </a>– Elegant Code [PDF]</h3>
<p><a href="http://elegantcode.com/wp-content/uploads/2010/03/Jquery-Validator-Cheat-sheet.pdf" target="_blank"><img title="25" src="http://images.uheed.com/iwanna/2010/09/20/jquery-cheat-sheets/25.jpg" alt="" width="550" height="189" /></a></p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/09/20/5352/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/09/20/5352/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/09/20/5352/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/09/20/5352/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/09/20/5352/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/09/20/5352/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>js/jquery 获取url参数</title>
		<link>http://www.iwanna.cn/archives/2010/09/17/5330/</link>
		<comments>http://www.iwanna.cn/archives/2010/09/17/5330/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 14:16:35 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5330</guid>
		<description><![CDATA[js代码： function GetQueryString(name) { var reg = new RegExp(&#8220;(^&#124;&#38;)&#8221;+ name +&#8221;=([^&#38;]*)(&#38;&#124;$)&#8221;); var r = window.location.search.substr(1).match(reg); if (r!=null) return unescape(r[2]); return null; } URL的参数&#38;参数名1=XXXX&#38;参数名 2=XXXX&#38;参数名3=XXXX alert(GetQueryString(&#8220;参数名1&#8243;)); alert(GetQueryString(&#8221; 参数名2&#8243;)); alert(GetQueryString(&#8220;参数名3&#8243;)); jquery 代码： 把下面代 码。放到js文件中 /** * jQuery.query &#8211; Query String Modification and Creation for jQuery * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) [...]]]></description>
			<content:encoded><![CDATA[<p>js代码：</p>
<p>function GetQueryString(name)<br />
{<br />
var reg = new  RegExp(&#8220;(^|&amp;)&#8221;+ name +&#8221;=([^&amp;]*)(&amp;|$)&#8221;);<br />
var r =  window.location.search.substr(1).match(reg);<br />
if (r!=null) return  unescape(r[2]); return null;<br />
}</p>
<p>URL的参数&amp;参数名1=XXXX&amp;参数名 2=XXXX&amp;参数名3=XXXX</p>
<p>alert(GetQueryString(&#8220;参数名1&#8243;));<br />
alert(GetQueryString(&#8221; 参数名2&#8243;));<br />
alert(GetQueryString(&#8220;参数名3&#8243;));<br />
<span id="more-5330"></span><br />
<a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jquery</a> 代码：</p>
<p>把下面代 码。放到js文件中</p>
<p>/**<br />
* jQuery.query &#8211; Query String Modification and  Creation for jQuery<br />
* Written by Blair Mitchelmore (blair DOT  mitchelmore AT gmail DOT com)<br />
* Licensed under the WTFPL (<a rel="external" href="http://sam.zoy.org/wtfpl/" target="_blank">http://sam.zoy.org/wtfpl/</a>).<br />
* Date: 2009/8/13<br />
*<br />
* @author Blair Mitchelmore<br />
* @version  2.1.6<br />
*<br />
**/<br />
new function(settings) {<br />
// Various  Settings<br />
var $separator = settings.separator || &#8216;&amp;&#8217;;<br />
var  $spaces = settings.spaces === false ? false : true;<br />
var $suffix =  settings.suffix === false ? &#8221; : &#8216;[]&#8216;;<br />
var $prefix =  settings.prefix === false ? false : true;<br />
var $hash = $prefix ?  settings.hash === true ? &#8220;#&#8221; : &#8220;?&#8221; : &#8220;&#8221;;<br />
var $numbers =  settings.numbers === false ? false : true;</p>
<p>jQuery.query = new  function() {<br />
var is = function(o, t) {<br />
return o !=  undefined &amp;&amp; o !== null &amp;&amp; (!!t ? o.constructor == t :  true);<br />
};<br />
var parse = function(path) {<br />
var m, rx =  /\[([^[]*)\]/g, match = /^([^[]+?)(\[.*\])?$/.exec(path), base =  match[1], tokens = [];<br />
while (m = rx.exec(match[2]))  tokens.push(m[1]);<br />
return [base, tokens];<br />
};<br />
var  set = function(target, tokens, value) {<br />
var o, token =  tokens.shift();<br />
if (typeof target != &#8216;object&#8217;) target = null;<br />
if  (token === &#8220;&#8221;) {<br />
if (!target) target = [];<br />
if  (is(target, Array)) {<br />
target.push(tokens.length == 0 ?  value : set(null, tokens.slice(0), value));<br />
} else if  (is(target, Object)) {<br />
var i = 0;<br />
while  (target[i++] != null);<br />
target[--i] = tokens.length == 0 ?  value : set(target[i], tokens.slice(0), value);<br />
} else {<br />
target  = [];<br />
target.push(tokens.length == 0 ? value : set(null,  tokens.slice(0), value));<br />
}<br />
} else if (token  &amp;&amp; token.match(/^\s*[0-9]+\s*$/)) {<br />
var index =  parseInt(token, 10);<br />
if (!target) target = [];<br />
target[index]  = tokens.length == 0 ? value : set(target[index], tokens.slice(0),  value);<br />
} else if (token) {<br />
var index =  token.replace(/^\s*|\s*$/g, &#8220;&#8221;);<br />
if (!target) target = {};<br />
if  (is(target, Array)) {<br />
var temp = {};<br />
for (var  i = 0; i &lt; target.length; ++i) {<br />
temp[i] = target[i];<br />
}<br />
target  = temp;<br />
}<br />
target[index] = tokens.length == 0 ?  value : set(target[index], tokens.slice(0), value);<br />
} else {<br />
return  value;<br />
}<br />
return target;<br />
};</p>
<p>var  queryObject = function(a) {<br />
var self = this;<br />
self.keys  = {};</p>
<p>if (a.queryObject) {<br />
jQuery.each(a.get(),  function(key, val) {<br />
self.SET(key, val);<br />
});<br />
}  else {<br />
jQuery.each(arguments, function() {<br />
var q  = &#8220;&#8221; + this;<br />
q = q.replace(/^[?#]/,&#8221;); // remove any  leading ? || #<br />
q = q.replace(/[;&amp;]$/,&#8221;); // remove any  trailing &amp; || ;<br />
if ($spaces) q = q.replace(/[+]/g,&#8217;  &#8216;); // replace +&#8217;s with spaces</p>
<p>jQuery.each(q.split(/[&amp;;]/),  function(){<br />
var key =  decodeURIComponent(this.split(&#8216;=&#8217;)[0] || &#8220;&#8221;);<br />
var val =  decodeURIComponent(this.split(&#8216;=&#8217;)[1] || &#8220;&#8221;);</p>
<p>if  (!key) return;</p>
<p>if ($numbers) {<br />
if  (/^[+-]?[0-9]+\.[0-9]*$/.test(val)) // simple float regex<br />
val  = parseFloat(val);<br />
else if (/^[+-]?[0-9]+$/.test(val))  // simple int regex<br />
val = parseInt(val, 10);<br />
}</p>
<p>val  = (!val &amp;&amp; val !== 0) ? true : val;</p>
<p>if  (val !== false &amp;&amp; val !== true &amp;&amp; typeof val !=  &#8216;number&#8217;)<br />
val = val;</p>
<p>self.SET(key,  val);<br />
});<br />
});<br />
}<br />
return self;<br />
};</p>
<p>queryObject.prototype  = {<br />
queryObject: true,<br />
has: function(key, type) {<br />
var  value = this.get(key);<br />
return is(value, type);<br />
},<br />
GET:  function(key) {<br />
if (!is(key)) return this.keys;<br />
var  parsed = parse(key), base = parsed[0], tokens = parsed[1];<br />
var  target = this.keys[base];<br />
while (target != null &amp;&amp;  tokens.length != 0) {<br />
target = target[tokens.shift()];<br />
}<br />
return  typeof target == &#8216;number&#8217; ? target : target || &#8220;&#8221;;<br />
},<br />
get:  function(key) {<br />
var target = this.GET(key);<br />
if  (is(target, Object))<br />
return jQuery.extend(true, {},  target);<br />
else if (is(target, Array))<br />
return  target.slice(0);<br />
return target;<br />
},<br />
SET:  function(key, val) {<br />
var value = !is(val) ? null : val;<br />
var  parsed = parse(key), base = parsed[0], tokens = parsed[1];<br />
var  target = this.keys[base];<br />
this.keys[base] = set(target,  tokens.slice(0), value);<br />
return this;<br />
},<br />
set:  function(key, val) {<br />
return this.copy().SET(key, val);<br />
},<br />
REMOVE:  function(key) {<br />
return this.SET(key, null).COMPACT();<br />
},<br />
remove:  function(key) {<br />
return this.copy().REMOVE(key);<br />
},<br />
EMPTY:  function() {<br />
var self = this;<br />
jQuery.each(self.keys,  function(key, value) {<br />
delete self.keys[key];<br />
});<br />
return  self;<br />
},<br />
load: function(url) {<br />
var hash =  url.replace(/^.*?[#](.+?)(?:\?.+)?$/, &#8220;$1&#8243;);<br />
var search =  url.replace(/^.*?[?](.+?)(?:#.+)?$/, &#8220;$1&#8243;);<br />
return new  queryObject(url.length == search.length ? &#8221; : search, url.length ==  hash.length ? &#8221; : hash);<br />
},<br />
empty: function() {<br />
return  this.copy().EMPTY();<br />
},<br />
copy: function() {<br />
return  new queryObject(this);<br />
},<br />
COMPACT: function() {<br />
function  build(orig) {<br />
var obj = typeof orig == &#8220;object&#8221; ? is(orig,  Array) ? [] : {} : orig;<br />
if (typeof orig == &#8216;object&#8217;) {<br />
function  add(o, key, value) {<br />
if (is(o, Array))<br />
o.push(value);<br />
else<br />
o[key]  = value;<br />
}<br />
jQuery.each(orig,  function(key, value) {<br />
if (!is(value)) return true;<br />
add(obj,  key, build(value));<br />
});<br />
}<br />
return  obj;<br />
}<br />
this.keys = build(this.keys);<br />
return  this;<br />
},<br />
compact: function() {<br />
return  this.copy().COMPACT();<br />
},<br />
toString: function() {<br />
var  i = 0, queryString = [], chunks = [], self = this;<br />
var  encode = function(str) {<br />
str = str + &#8220;&#8221;;<br />
if  ($spaces) str = str.replace(/ /g, &#8220;+&#8221;);<br />
return  encodeURIComponent(str);<br />
};<br />
var addFields =  function(arr, key, value) {<br />
if (!is(value) || value ===  false) return;<br />
var o = [encode(key)];<br />
if  (value !== true) {<br />
o.push(&#8220;=&#8221;);<br />
o.push(encode(value));<br />
}<br />
arr.push(o.join(&#8220;&#8221;));<br />
};<br />
var  build = function(obj, base) {<br />
var newKey = function(key) {<br />
return  !base || base == &#8220;&#8221; ? [key].join(&#8220;&#8221;) : [base, "[", key, "]&#8220;].join(&#8220;&#8221;);<br />
};<br />
jQuery.each(obj,  function(key, value) {<br />
if (typeof value == &#8216;object&#8217;)<br />
build(value,  newKey(key));<br />
else<br />
addFields(chunks,  newKey(key), value);<br />
});<br />
};</p>
<p>build(this.keys);</p>
<p>if  (chunks.length &gt; 0) queryString.push($hash);<br />
queryString.push(chunks.join($separator));</p>
<p>return  queryString.join(&#8220;&#8221;);<br />
}<br />
};</p>
<p>return new  queryObject(location.search, location.hash);<br />
};<br />
}(jQuery.query  || {}); // Pass in jQuery.query as settings object</p>
<p>如 果想获取test，则可以引入插件后，<br />
用如下方法获取：<br />
var test = $.query.get(&#8216;test&#8217;);</p>
<p>如 果参数有多个相同的名称 ，则可以这样：<br />
var arr = $.query.get(&#8216;testy&#8217;);<br />
输出：   [ 值1 ,    值2,   值3...]</p>
<p>如果要获取多个相同名称中的某一个，可以这样：<br />
var arrayElement =  $.query.get(&#8216;testy[1]&#8216;);</p>
<p>此插件不仅能获取参数，也能设置参数。</p>
<p>设置一个参数：<br />
var  newUrl = $.query.set(&#8220;section&#8221;, 5).toString();<br />
输出   ： &#8220;?section=5&#8243;</p>
<p>设 置两个参数：<br />
var newUrl = $.query.set(&#8220;section&#8221;, 5).set(&#8220;action&#8221;,  &#8220;do&#8221;).toString();<br />
输出 :   &#8220;?action=do§ion=5&#8243;</p>
<p>删除一个参数：<br />
var  oldQueryAgain = $.query.REMOVE(&#8220;type&#8221;);</p>
<p>清空所有参数：<br />
var  emptyQuery = $.query.empty();</p>
<p>复制所有参数：<br />
var stillTheSame =  $.query.copy();</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/09/17/5330/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/09/17/5330/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/09/17/5330/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/09/17/5330/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/09/17/5330/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/09/17/5330/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决IE6不支持max-height的bug</title>
		<link>http://www.iwanna.cn/archives/2010/09/12/5232/</link>
		<comments>http://www.iwanna.cn/archives/2010/09/12/5232/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 14:46:22 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[程序源码]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Source-code]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5232</guid>
		<description><![CDATA[罪恶的IE6不支持max-height属性，不过我们可以通过jQuery来解决IE6不支持max- height，jQuery的代码如下： $(".entry").each(function(){ if($(this)[0].scrollHeight&#38;gt;500) $(this).css({"height":"500px"}); }); 原理: 在IE6中可以通过设定height来达到max-height的 效果. 循环所有要加max-height属性的DOM元素,判断他的scrollHeight大于你要设置的最大高度 如果超过了就通过设置height为最大高度，我这里使用的是[0]，获取的是的DOM对象，而不是jQuery对象，详细说明见：《jQuery选择器使用详解》 上面的代码还没有加入IE6的判断,完整代码如下: if($.browser.msie&#38;amp;&#38;amp;($.browser.version === "6.0")){ $(".entry").each(function(){ if($(this)[0].scrollHeight&#38;gt;500) $(this).css({"height":"500px","overflow":"hidden"}); });} 当然你也可以通过css表达式来实现IE6支持max-height属性 .entry{ //我烧验证woshao_985140e4b71711df9e5e000c295b2b8d height: expression( this.scrollHeight &#38;gt; 500 ? "500px" : "auto" ); /* sets max-height for IE */ } © 我想网 Akon 所有 , 2010. &#124; 永久链接 &#124; 没有评论 &#124; 提交到 Google Reader 鲜果 抓虾 [...]]]></description>
			<content:encoded><![CDATA[<p>罪恶的IE6不支持<strong>max-height</strong>属性，不过我们可以通过jQuery来解决IE6不支持max- height，<strong><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a></strong>的代码如下：</p>
<pre>$(".entry").each(function(){
    if($(this)[0].scrollHeight&amp;gt;500)
     $(this).css({"height":"500px"});
});</pre>
<p><strong>原理</strong>: 在IE6中可以通过设定height来达到<strong>max-height</strong>的 效果. 循环所有要加max-height属性的DOM元素,判断他的scrollHeight大于你要设置的最大高度  如果超过了就通过设置height为最大高度，我这里使用的是[0]，获取的是的DOM对象，而不是jQuery对象，详细说明见：《jQuery选择器使用详解》<br />
<span id="more-5232"></span><br />
上面的代码还没有加入IE6的判断,完整代码如下:</p>
<pre>if($.browser.msie&amp;amp;&amp;amp;($.browser.version === "6.0")){
$(".entry").each(function(){
if($(this)[0].scrollHeight&amp;gt;500)
$(this).css({"height":"500px","overflow":"hidden"});
});}</pre>
<p>当然你也可以通过<strong>css表达式</strong>来实现<strong><a href="http://www.iwanna.cn/tags/ie6/" class="st_tag internal_tag" rel="tag" title="标签 IE6 下的日志">IE6</a></strong>支持max-height属性</p>
<div>
<div>
<pre>.entry{
//我烧验证woshao_985140e4b71711df9e5e000c295b2b8d
height: expression( this.scrollHeight &amp;gt; 500 ? "500px" : "auto" ); /* sets max-height for IE */
}</pre>
</div>
</div>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/09/12/5232/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/09/12/5232/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/09/12/5232/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/09/12/5232/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/09/12/5232/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/09/12/5232/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>25个免费的WordPress图片相册幻灯插件</title>
		<link>http://www.iwanna.cn/archives/2010/09/12/5211/</link>
		<comments>http://www.iwanna.cn/archives/2010/09/12/5211/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 14:03:19 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5211</guid>
		<description><![CDATA[WordPress对于所有的blogger来说算是一款不错的CMS，因为它易于使用和管理，尤其是插件和其他应用设置。下面列出的是25个免费的WordPress图片相册插件，这些插件全都能在WordPress插件页面上找到，用这些插件你可以很方便的在你的站点上显示和管理你的图片相册和 幻灯。 Dynamic Content Gallery Lightview Plus Shadowbox JS Post video players slideshow and photo galleries PhotoSmash Galleries Featured Content Gallery FancyBox for WordPress WordPress Gallery Slideshow Lazyest Gallery Flickr + Highslide Inline Gallery Media Library Gallery Picasna Flickr Tag Shutter Reloaded jQuery Lightbox WP Photo Album Fotobook NextGEN Gallery WP-SimpleViewer Yet Another Photoblog Lightbox [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.iwanna.cn/tags/wordpress-php-develope/" class="st_tag internal_tag" rel="tag" title="标签 Wordpress 下的日志">WordPress</a></strong>对于所有的blogger来说算是一款不错的CMS，因为它易于使用和管理，尤其是插件和其他应用设置。下面列出的是<strong><a href="http://www.iwanna.cn/archives/2010/09/12/5211/" title="25个免费的WordPress图片相册幻灯插件">25个免费的WordPress图片相册插件</a></strong>，这些插件全都能在<a>WordPress插件页面</a>上找到，用这些插件你可以很方便的在你的站点上显示和管理你的图片相册和 幻灯。</p>
<h3><a href="http://wordpress.org/extend/plugins/dynamic-content-gallery-plugin/">Dynamic  Content <a href="http://www.iwanna.cn/tags/gallery/" class="st_tag internal_tag" rel="tag" title="标签 Gallery 下的日志">Gallery</a></a></h3>
<p><a href="http://wordpress.org/extend/plugins/dynamic-content-gallery-plugin/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009101-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a><br />
<span id="more-5211"></span></p>
<h3><a href="http://wordpress.org/extend/plugins/lightview-plus/">Lightview  Plus</a></h3>
<p><a href="http://wordpress.org/extend/plugins/lightview-plus/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009102-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/shadowbox-js/">Shadowbox  JS</a></h3>
<p><a href="http://wordpress.org/extend/plugins/shadowbox-js/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009103-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/post-rich-videos-and-photos-galleries/">Post  video players slideshow and photo galleries</a></h3>
<p><a href="http://wordpress.org/extend/plugins/post-rich-videos-and-photos-galleries/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009104-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/photosmash-galleries/">PhotoSmash  Galleries</a></h3>
<p><a href="http://wordpress.org/extend/plugins/photosmash-galleries/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009105-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/featured-content-gallery/">Featured  Content Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/featured-content-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009106-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/fancybox-for-wordpress/">FancyBox  for WordPress</a></h3>
<p><a href="http://wordpress.org/extend/plugins/fancybox-for-wordpress/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009107-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/wordpress-gallery-slideshow/">WordPress  Gallery Slideshow</a></h3>
<p><a href="http://wordpress.org/extend/plugins/wordpress-gallery-slideshow/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009108-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/lazyest-gallery/">Lazyest  Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/lazyest-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/201009109-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="436" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/flickr-highslide/">Flickr  + Highslide</a></h3>
<p><a href="http://wordpress.org/extend/plugins/flickr-highslide/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091010-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="450" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/inline-gallery/">Inline  Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/inline-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091011-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/inline-gallery/">Media  Library Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/inline-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091012-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/picasna/">Picasna</a></h3>
<p><a href="http://wordpress.org/extend/plugins/picasna/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091013-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/flickr-tag/">Flickr Tag</a></h3>
<p><a href="http://wordpress.org/extend/plugins/flickr-tag/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091014-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/shutter-reloaded/">Shutter  Reloaded</a></h3>
<p><a href="http://wordpress.org/extend/plugins/shutter-reloaded/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091015-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/jquery-lightbox-balupton-edition/"><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a>  Lightbox</a></h3>
<p><a href="http://wordpress.org/extend/plugins/jquery-lightbox-balupton-edition/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091016-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/wp-photo-album/">WP  Photo Album</a></h3>
<p><a href="http://wordpress.org/extend/plugins/wp-photo-album/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091017-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/fotobook/">Fotobook</a></h3>
<p><a href="http://wordpress.org/extend/plugins/fotobook/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091018-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/nextgen-gallery/">NextGEN  Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/nextgen-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091019-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/wp-simpleviewer/">WP-SimpleViewer</a></h3>
<p><a href="http://wordpress.org/extend/plugins/wp-simpleviewer/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091020-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/yet-another-photoblog/">Yet  Another Photoblog</a></h3>
<p><a href="http://wordpress.org/extend/plugins/yet-another-photoblog/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091021-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/lightbox-gallery/">Lightbox  Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/lightbox-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091022-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/page-flip-image-gallery/">Page  Flip Image Gallery</a></h3>
<p><a href="http://wordpress.org/extend/plugins/page-flip-image-gallery/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091023-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/dm-albums/">DM Albums</a></h3>
<p><a href="http://wordpress.org/extend/plugins/dm-albums/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091024-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<h3><a href="http://wordpress.org/extend/plugins/misiek-photo-album/">Misiek  Photo Album</a></h3>
<p><a href="http://wordpress.org/extend/plugins/misiek-photo-album/"><img title="25个免费的WordPress图片相册幻灯插件" src="http://images.uheed.com/iwanna/2010/09/12/wordpress-jquery-slides/2010091025-wp.jpg" alt="25个免费的WordPress图片相册幻灯插件" width="450" height="300" /></a></p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/09/12/5211/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/09/12/5211/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/09/12/5211/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/09/12/5211/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/09/12/5211/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/09/12/5211/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于jQuery ready()方法一些用法解释</title>
		<link>http://www.iwanna.cn/archives/2010/08/31/5151/</link>
		<comments>http://www.iwanna.cn/archives/2010/08/31/5151/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 14:37:47 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[程序源码]]></category>
		<category><![CDATA[Source-code]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=5151</guid>
		<description><![CDATA[jQuery的ready方 法的是开发中经常用到的，作用相当于我们的body onload，是当页面DOM准备就绪的时候才运行的代码，最常用的就是在DOM渲染加载之前，先给document绑定ready事件，然后当页面 DOM都准备好之后才运行这个事件。 关于jQuery的ready有以下几种用法 最常用也是最标准的ready方法 $(document).ready(){ }); 简写的jQuery ready() $(function(){ }); 这是因为jQuery的选择器第一个参数假如为空，那么默认的是document 不建议使用的ready()方法 $().ready(handler); 在jQuery1.4 发布公告中提到了：在jQuery1.4中仍然保留这种方法，但是不推荐使用，并且 jQuery1.3的ready会返回一个jQuery的对象，而1.4中则不会又返回 解决jQuery（$）库冲突的ready方法 这一种方式一般用在处理jQuery的$和别的库冲突的时候用的,可以通过jQuery.noConflict()这 个方法,我们就可以直接在代码中通过jQuery来代替$来使用,但又习惯了使用$怎么办?看下面的代码: jQuery.noConflict(); jQuery(function($){ alert($("#ready1").html()); //这样我们就可以使用$了 }); 后记 一般在开发中断桥残雪是不会推荐使用jQuery的ready方法的，因为绑定 ready事件之后，jQuery需要添加DOMContentLoaded监听事件，对于页面加载渲染是有一定影响 的，所以建议我们在逼不得已的情况下才使用jQuery的ready。 在实际开发中我推荐把ready中要执行的函数放在DOM的HTML代码之后，也就是当DOM渲染过去之后再执行handler，或者把代码直接放 在页面的末尾 © 我想网 Akon 所有 , 2010. &#124; 永久链接 &#124; 没有评论 &#124; 提交到 Google Reader 鲜果 抓虾 Feed enhanced by Better Feed from Ozh]]></description>
			<content:encoded><![CDATA[<p>jQuery的<strong>ready</strong>方 法的是开发中经常用到的，作用相当于我们的body onload，是当页面DOM准备就绪的时候才运行的代码，最常用的就是在DOM渲染加载之前，先给document绑定ready事件，然后当页面 DOM都准备好之后才运行这个事件。<br />
关于<strong><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a></strong>的ready有以下几种用法</p>
<h3>最常用也是最标准的ready方法</h3>
<blockquote><p><code><br />
$(document).ready(){<br />
});<br />
</code></p></blockquote>
<p><span id="more-5151"></span></p>
<h3>简写的jQuery ready()</h3>
<blockquote><p><code><br />
$(function(){<br />
});<br />
</code></p></blockquote>
<p>这是因为<strong>jQuery</strong>的选择器第一个参数假如为空，那么默认的是<strong>document</strong></p>
<h3>不建议使用的ready()方法</h3>
<blockquote><p><code><br />
$().ready(handler);<br />
</code></p></blockquote>
<p>在<a href="http://jquery14.com/day-01/jquery-14" target="_blank">jQuery1.4 发布公告</a>中提到了：在jQuery1.4中仍然保留这种方法，但是不推荐使用，并且 jQuery1.3的ready会返回一个jQuery的对象，而1.4中则不会又返回</p>
<h3>解决jQuery（$）库冲突的ready方法</h3>
<p>这一种方式一般用在处理jQuery的$和别的<strong>库冲突</strong>的时候用的,可以通过<strong><code>jQuery.noConflict()</code></strong>这 个方法,我们就可以直接在代码中通过jQuery来代替$来使用,但又习惯了使用$怎么办?看下面的代码:</p>
<blockquote><p><code><br />
jQuery.noConflict();<br />
jQuery(function($){<br />
    alert($("#ready1").html());   //这样我们就可以使用$了<br />
});<br />
</code></p></blockquote>
<h3>后记</h3>
<p>一般在开发中断桥残雪是不会推荐使用jQuery的ready方法的，因为绑定 ready事件之后，jQuery需要添加<strong>DOMContentLoaded</strong>监听事件，对于页面加载渲染是有一定影响 的，所以建议我们在逼不得已的情况下才使用jQuery的ready。</p>
<p>在实际开发中我推荐把ready中要执行的函数放在DOM的HTML代码之后，也就是当DOM渲染过去之后再执行handler，或者把代码直接放 在页面的末尾</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/08/31/5151/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/08/31/5151/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/08/31/5151/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/08/31/5151/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/08/31/5151/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/08/31/5151/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10个jquery动画菜单：插件和教程</title>
		<link>http://www.iwanna.cn/archives/2010/08/16/4953/</link>
		<comments>http://www.iwanna.cn/archives/2010/08/16/4953/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 15:36:32 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=4953</guid>
		<description><![CDATA[jQuery是一个非常容易使用，同时也是扩展性很好的一个javascript框架。使用jquery可以非常容易的实现一些页面的ajax效 果。本文收集一批使用jquery实现很酷的动画效果菜单的插件和教程。 插件 LavaLamp 相信很多人都见过这个很酷的菜单插件，也有很多网站成功的应用了这个插件。 插件主页 jquery Kwicks 插件 如果你多Mootools有些了解，或许会注意到Mootools上一版主页的一个滑动菜单效果(现在已经看不到了)。这个插件就是来自于这个效 果，很酷，也很容易定制。使用这个插件不仅仅可以制作非常个性的菜单，制作某些步骤演示也非常合适——比如购物流程的演示。插件主页 查看演示 &#124; 下载 仿Mac的停靠菜单插件 这是个仿苹果机的停靠菜单的一个jQuery插件，支持水平和竖直两种。查看插件页面。 查看演示 &#124; 下载 jquery滑动菜单 一个和LavaLamp很像的菜单，而且脚本只有不到1kb(lavalamp也是这么小)，也比较容易使用。该菜单的原理是，通过在当前ul元素 的下面(或者说”后面”更合适些？)添加一个额外的div，用position定位该div。然后用jquery和插件来控制这个div的大小和位置，并 实现动画效果。 查看演示 &#124; 下载 教程 CSS Sprites2 – 使用jquery制作动画菜单 知名博客alistapart的一个关于CSS Sprites的教程，这个网站对CSS Sprites的技术的普及起到了非常重要的作用。本文的目的是介绍基于javascript的CSS Sprites技术，只是是通过制作动画菜单的例子来讲解。非常值得一读。查看教程 查看演示 使用jQuery的动画菜单 教你如何使用CSS和jquery的animate()函数改变背景色的透明度(opacity)来实现动画菜单的一个教程，讲的很详细，如果你看 不懂英文没关系，能看懂教程中的代码就OK了。查看教程 查看演示 使用CSS和jquery创建很酷的动画导航菜单 Nettus推出的一个教程，非常详细的讲解如何使用CSS和jquery制作很酷的动画效果的菜单。查看教程 查看演示 &#124; 下载源文件 CSS Dock Menu 来自www.ndesign-studio.com的一篇使用CSS制作停靠菜单的教程，使用了 jquery机器FishEye插件。查看教程 查看演示 &#124; 下载 使用jquery制作平滑的动画导航 一个很不错的导航效果，这个教程很详细的讲解了制作这个菜单的步骤。使用了jquery的easing组件。查看教程 [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery是一个非常容易使用，同时也是扩展性很好的一个javascript框架。使用jquery可以非常容易的实现一些页面的ajax效 果。本文收集一批使用<strong><a href="http://www.iwanna.cn/archives/2010/08/16/4953/" title="10个jquery动画菜单：插件和教程">jquery实现很酷的动画效果菜单的插件和教程</a></strong>。</p>
<h2>插件</h2>
<h3>LavaLamp</h3>
<p><a href="http://www.gmarwaha.com/blog/category/client-side/jquery/" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080044371.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>相信很多人都见过这个很酷的菜单插件，也有很多网站成功的应用了这个插件。<br />
<span id="more-4953"></span><br />
<a href="http://www.gmarwaha.com/blog/category/client-side/jquery/" target="_blank"><span style="color: #2c6288;">插件主页</span></a></p>
<h3><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jquery</a> Kwicks 插件</h3>
<p><a href="http://www.jeremymartin.name/examples/kwicks.php?example=1" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080045643.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>如果你多Mootools有些了解，或许会注意到Mootools上一版主页的一个滑动菜单效果(现在已经看不到了)。这个插件就是来自于这个效 果，很酷，也很容易定制。使用这个插件不仅仅可以制作非常个性的菜单，制作某些步骤演示也非常合适——比如购物流程的演示。<a href="http://www.jeremymartin.name/projects.php?project=kwicks" target="_blank"><span style="color: #2c6288;">插件主页</span></a></p>
<p><a href="http://www.jeremymartin.name/examples/kwicks.php?example=1" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://www.jeremymartin.name/projects.php?project=kwicks" target="_blank"><span style="color: #2c6288;">下载</span></a></p>
<h3>仿Mac的停靠菜单插件</h3>
<p><a href="http://www.wizzud.com/jqDock/" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080046925.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>这是个仿苹果机的停靠菜单的一个jQuery插件，支持水平和竖直两种。<a href="http://plugins.jquery.com/project/jqDock" target="_blank"><span style="color: #2c6288;">查看插件页面</span></a>。</p>
<p><a href="http://www.wizzud.com/jqDock/" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://plugins.jquery.com/files/jqDock.v1_2_1.zip" target="_blank"><span style="color: #2c6288;">下载</span></a></p>
<h3>jquery滑动菜单</h3>
<p><a href="http://www.leigeber.com/2008/05/sliding-javascript-menu-highlight-1kb/" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080046931.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>一个和LavaLamp很像的菜单，而且脚本只有不到1kb(lavalamp也是这么小)，也比较容易使用。该菜单的原理是，通过在当前ul元素 的下面(或者说”后面”更合适些？)添加一个额外的div，用position定位该div。然后用jquery和插件来控制这个div的大小和位置，并 实现动画效果。</p>
<p><a href="http://www.leigeber.com/2008/05/sliding-javascript-menu-highlight-1kb/" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://www.leigeber.com/wp-content/uploads/2008/05/menueffect.zip" target="_blank"><span style="color: #2c6288;">下载</span></a></p>
<hr />
<h2>教程</h2>
<h3>CSS Sprites2 – 使用jquery制作动画菜单</h3>
<p><a href="http://www.alistapart.com/d/sprites2/examples/example6-function.html" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080048533.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>知名博客<a href="http://www.alistapart.com/" target="_blank"><span style="color: #2c6288;">alistapart</span></a>的一个关于CSS Sprites的教程，这个网站对CSS  Sprites的技术的普及起到了非常重要的作用。本文的目的是介绍基于javascript的CSS  Sprites技术，只是是通过制作动画菜单的例子来讲解。非常值得一读。<a href="http://www.alistapart.com/articles/sprites2" target="_blank"><span style="color: #2c6288;">查看教程</span></a></p>
<p><a href="http://www.alistapart.com/d/sprites2/examples/example6-function.html" target="_blank"><span style="color: #2c6288;">查看演示</span></a></p>
<h3>使用jQuery的动画菜单</h3>
<p><a href="http://www.shopdev.co.uk/blog/animated-menus-using-jquery/" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080048483.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" width="462" height="164" /></a></p>
<p>教你如何使用CSS和jquery的animate()函数改变背景色的透明度(opacity)来实现动画菜单的一个教程，讲的很详细，如果你看 不懂英文没关系，能看懂教程中的代码就OK了。<a href="http://www.shopdev.co.uk/blog/animated-menus-using-jquery/" target="_blank"><span style="color: #2c6288;">查看教程</span></a></p>
<p><a href="http://www.shopdev.co.uk/blog/animated-menus-using-jquery/" target="_blank"><span style="color: #2c6288;">查看演示</span></a></p>
<h3>使用CSS和jquery创建很酷的动画导航菜单</h3>
<p><a href="http://nettuts.s3.amazonaws.com/009_jQueryMenu/sm/result/index.html" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080050434.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>Nettus推出的一个教程，<strong>非常详细</strong>的讲解如何使用CSS和jquery制作很酷的动画效果的菜单。<a href="http://nettuts.com/javascript-ajax/create-a-cool-animated-navigation-with-css-and-jquery/" target="_blank"><span style="color: #2c6288;">查看教程</span></a></p>
<p><a href="http://nettuts.s3.amazonaws.com/009_jQueryMenu/sm/result/index.html" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://nettuts.s3.amazonaws.com/009_jQueryMenu/sm/result.zip" target="_blank"><span style="color: #2c6288;">下载源文件</span></a></p>
<h3>CSS Dock <a href="http://www.iwanna.cn/tags/menu/" class="st_tag internal_tag" rel="tag" title="标签 Menu 下的日志">Menu</a></h3>
<p><a href="http://www.ndesign-studio.com/demo/css-dock-menu/css-dock.html" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080051632.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>来自<a href="http://www.ndesign-studio.com/" target="_blank"><span style="color: #2c6288;">www.ndesign-studio.com</span></a>的一篇使用CSS制作停靠菜单的教程，使用了 jquery机器FishEye插件。<a href="http://www.ndesign-studio.com/blog/design/css-dock-menu/" target="_blank"><span style="color: #2c6288;">查看教程</span></a></p>
<p><a href="http://www.ndesign-studio.com/demo/css-dock-menu/css-dock.html" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://www.ndesign-studio.com/file/css-dock-menu.zip" target="_blank"><span style="color: #2c6288;">下载</span></a></p>
<h3>使用jquery制作平滑的动画导航</h3>
<p><a href="http://buildinternet.com/live/smoothmenu/animated-menu.html" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080052411.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>一个很不错的导航效果，这个教程很详细的讲解了制作这个菜单的步骤。使用了jquery的easing组件。<a href="http://buildinternet.com/2009/01/how-to-make-a-smooth-animated-menu-with-jquery/" target="_blank"><span style="color: #2c6288;">查看教程</span></a></p>
<p><a href="http://buildinternet.com/live/smoothmenu/animated-menu.html" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://buildinternet.com/live/smoothmenu/animated-menu.zip" target="_blank"><span style="color: #2c6288;">下载</span></a></p>
<h3>使用jquery实现动画背景图片</h3>
<p><a href="http://snook.ca/technical/jquery-bg/" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/16/jquery-animations/20090608080052621.jpg" alt="10个jquery动画菜单：插件和教程 | iwanna.cn 我想网" /></a></p>
<p>这是一个教程，作者结合了上面提到的CSS Sprites2教程，结合<a href="http://plugins.jquery.com/project/backgroundPosition-Effect" target="_blank"><span style="color: #2c6288;">jquery 背景动画插件</span></a>来实现的一个效果。这 个效果很不错，很酷。<a href="http://snook.ca/archives/javascript/jquery-bg-image-animations/" target="_blank"><span style="color: #2c6288;">查看教程</span></a>。</p>
<p><a href="http://snook.ca/technical/jquery-bg/" target="_blank"><span style="color: #2c6288;">查看演示</span></a> | <a href="http://www.cnblogs.com/luluping/admin/" target="_blank"><span style="color: #2c6288;">下载</span></a></p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/08/16/4953/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/08/16/4953/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/08/16/4953/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/08/16/4953/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/08/16/4953/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/08/16/4953/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>初探 jQuery 的 Sizzle 选择器</title>
		<link>http://www.iwanna.cn/archives/2010/08/11/4907/</link>
		<comments>http://www.iwanna.cn/archives/2010/08/11/4907/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 13:27:51 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=4907</guid>
		<description><![CDATA[这是一篇关于介绍jQuery Sizzle选择器的文章，由我和obility共同完成。在文中，我们试图用自己的语言配以适量的代码向读者展现出Sizzle在处理选择符时的流程原 理，以及末了以少许文字给你展示出如何借用Sizzle之手实现自定义选择器（也许更标准的叫法叫做过滤符）和它与YUI 选择器的大致比较。 前序 jQuery相比1.2的版本，在内部代码的构造上已经出现了巨大的变化，其之一便是模块的分发.我记得09年在jquery 9月开的一次大会上 john放出的一张ppt上 也指出了当前的jquery下一步目标，不仅仅是除了sizzle选择器的分离，届时core，attribute，css以及 manipulation，包括event也都会独立成单独的js文件.（1.4的文件结构，其实已经分成单独的16个模块的组成） 随着jQuery被用来构建web app的场合愈来愈多，它的性能自然受到了大部分开发者的高度关注，它的内部实现机理又是如何，比如选择器的实现。 Sizzle，作为一个独立全新的选择器引擎，出现在jQuery 1.3版本之后，并被John Resig作为一个开源的项目，可以用于其他框架：Mool, Dojo，YUI等。 好了，现在来看为什么Sizzle选择器如此受欢迎，使它能够在常用dom匹配上 都快于其他选择器而让这些框架们都垂青于它。 概要 一般选择器的匹配模式（包括jq1.2之前），都是一个顺序的思维方式，在需要递进式匹配时，比如$(‘div span’) 这样的匹配时，执行的操作都是先匹配页面中div然后再匹配它的节点下的span标签，之后返回结果。 Sizzle则采取了相反Right To Left的实现方式，先搜寻页面中所有的span标签，再其后的操作中才去判断它的父节点（包括父节点以上）是否为div，是则压入数组，否则pass， 进入下一判断，最后返回该操作序列。 另外，在很多细节上也进行了优化。 浅析源码 在探索 $ 符 和 Sizzle的协同工作原理前，先引用一张图片. 开始吧。（$符在这里不作过多的介绍）. 当我们给$符传递进一个参数（也可能是多个）时，此时它会根据参数的类型（domElement &#124; string &#124; fn &#124; array）进入不同的流程，在此，重点看 string 类型的处理，因为只有它才可以触发Sizzle。首先调用正则匹配看是否为创建dom节点的操作，然后看是否为简单id匹配，这一步也由正则匹配完成，否 则进入jQuery.fn.find()函数，由此进入Sizzle的天地。 当进入Sizzle时，一般情况下会配备三参：所要匹配的选择符，上下文，匹配的结果集。调用正则对传入的selector做一次”预匹配”. var chunker = /((?:\((?:\([^()]+\)&#124;[^()]+)+\)&#124;\[(?:\[[^[\]]*\]&#124;['"][^'"]*['"]&#124;[^[\]'"]+)+\]&#124;\\.&#124;[^ &#62;+~,(\[\\]+)+&#124;[&#62;+~])(\s*,\s*)?/g, 让我们看一下一个简单选择器的实现过程：比如 div &#62; p。我们要先找出符合条件的div[div]，再找出符合条件的p[p]，最后在上下文里[div]过滤出符合条件”&#62;”的p[p];抽象一点的说 法就是：在已知的上下文里，根据关系找出相应的节点。 [...]]]></description>
			<content:encoded><![CDATA[<p>这是一篇关于介绍jQuery Sizzle选择器的文章，由我和obility共同完成。在文中，我们试图用自己的语言配以适量的代码向读者展现出Sizzle在处理选择符时的流程原 理，以及末了以少许文字给你展示出如何借用Sizzle之手实现自定义选择器（也许更标准的叫法叫做过滤符）和它与YUI 选择器的大致比较。</p>
<h3><strong>前序<a name="前序"> </a></strong></h3>
<p>jQuery相比1.2的版本，在内部代码的构造上已经出现了巨大的变化，其之一便是模块的分发.我记得09年在jquery 9月开的一次大会上  john放出的一张ppt上  也指出了当前的jquery下一步目标，不仅仅是除了sizzle选择器的分离，届时core，attribute，css以及 manipulation，包括event也都会独立成单独的js文件.（1.4的文件结构，其实已经分成单独的<a href="http://github.com/jquery/jquery/tree/master/src">16</a>个模块的组成）</p>
<p>随着jQuery被用来构建web  app的场合愈来愈多，它的性能自然受到了大部分开发者的高度关注，它的内部实现机理又是如何，比如选择器的实现。<br />
<span id="more-4907"></span><br />
<a href="http://sizzlejs.com/">Sizzle</a>，作为一个独立全新的选择器引擎，出现在jQuery  1.3版本之后，并被John Resig作为一个开源的项目，可以用于其他框架：Mool, Dojo，YUI等。</p>
<p>好了，现在来看为什么Sizzle选择器如此受欢迎，使它能够在<a href="http://ejohn.org/blog/selectors-that-people-actually-use/">常用dom匹配</a>上 都快于其他选择器而让这些框架们都垂青于它。</p>
<h3><strong>概要<a name="概要"> </a></strong></h3>
<p>一般选择器的匹配模式（包括jq1.2之前），都是一个顺序的思维方式，在需要递进式匹配时，比如$(‘div span’)  这样的匹配时，执行的操作都是先匹配页面中div然后再匹配它的节点下的span标签，之后返回结果。</p>
<p>Sizzle则采取了相反Right To  Left的实现方式，先搜寻页面中所有的span标签，再其后的操作中才去判断它的父节点（包括父节点以上）是否为div，是则压入数组，否则pass， 进入下一判断，最后返回该操作序列。</p>
<p>另外，在很多细节上也进行了优化。</p>
<h3><strong>浅析源码<a name="浅析源码"> </a></strong></h3>
<p>在探索 $ 符 和 Sizzle的协同工作原理前，先引用一张图片.</p>
<p><a href="http://images.uheed.com/iwanna/2010/08/11/jquery-sizzle.jpg" target="_blank"><img src="http://images.uheed.com/iwanna/2010/08/11/jquery-sizzle.jpg" alt="初探 jQuery 的 Siz | iwanna.cn 我想网" width="640" /></a></p>
<p>开始吧。（$符在这里不作过多的介绍）.</p>
<p>当我们给$符传递进一个参数（也可能是多个）时，此时它会根据参数的类型（domElement | string | fn |  array）进入不同的流程，在此，重点看 string  类型的处理，因为只有它才可以触发Sizzle。首先调用正则匹配看是否为创建dom节点的操作，然后看是否为简单id匹配，这一步也由正则匹配完成，否 则进入jQuery.fn.find()函数，由此进入Sizzle的天地。</p>
<p>当进入Sizzle时，一般情况下会配备三参：所要匹配的选择符，上下文，匹配的结果集。调用正则对传入的selector做一次”预匹配”.</p>
<div>
<pre>var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,
</pre>
</div>
<p>让我们看一下一个简单选择器的实现过程：比如 div &gt;  p。我们要先找出符合条件的div[div]，再找出符合条件的p[p]，最后在上下文里[div]过滤出符合条件”&gt;”的p[p];抽象一点的说 法就是：在已知的<strong>上下文</strong>里，根据<strong>关系</strong>找出相应的<strong>节点</strong>。 他们靠关系联系起来。那么对于选择器的操作也就是根据关系来分组。一次次缩小上下文，直到找出符合条件的节点。</p>
<p>回到我们的话题，还是先看看这个令人费解的正则，相信你会有更好的分析方法，但是眼下，我还是一点点的拆分，让它表达的更清晰一点。先按照分组拆， 即():</p>
<div>
<pre>((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])

(\s*,\s*)?

((?:.|\r|\n)*)
</pre>
</div>
<p>第一行还是有点长，用’|&#8217;拆分它:</p>
<div>
<pre>1. (?:\((?:\([^()]+\)
2.[^()]+)+\)
3. \[(?:\[[^[\]]*\]
4. [^[\]]+)+\]|\\.
5.[^ &gt;+~,(\[]+)+
6.[&gt;+~]
</pre>
</div>
<p>对于如div &gt; p。会得到数组结果['div','&gt;','p']。</p>
<p>对于更复杂的选择器，如div.classname &gt;  p.classname。会得到结果['div.classname','&gt;','p.classname']。</p>
<p>对于具有合并的‘,’,只是递归调用下获取结果再合并而已。过程开始变得简单起来。</p>
<p>对于普通的解析过程，我们遵循着从左到右的顺序即可完成我们的目标。</p>
<p>让我们总结下步骤：</p>
<div>
<pre>1.先查找页面上所有的div 

2.循环所有的div，查找每个div下的p  

3.合并结果
</pre>
</div>
<p>Sizzle用了截然相反的步骤：</p>
<div>
<pre>1.先查找页面上所有的p 

2.循环所有的p，查找每个p的父元素
  1.如果不是div，遍历上一层。
  2.如果已经是顶层，排除此p。
  3.如果是div，则保存此p元素。
</pre>
</div>
<p>由子元素来查找父元素，能得到更好的效率。看，打破常规思维后不仅步骤更简单了，而且效率上也得到了些许提升。</p>
<p>所有的选择器都可以这样解析吗？不是，采用right -&gt; left的顺序是有前提条件的：没有位置关系的约束。</p>
<p>比如如下这段html：</p>
<div>
<pre>
<div>
<div>&lt;div&gt;
&lt;p id="p1"&gt;p1content
&lt;p id="p2"&gt;p2content
&lt;/div&gt;
&lt;div&gt;
&lt;p id="p3"&gt;p3content
&lt;p id="p4"&gt;p4content
&lt;/div&gt;</div>
</div>
</pre>
</div>
<p>对于选择器：$(“div p:first”)只会返回["#p1"]</p>
<p>而$(“div p:first-child”)则返回["#p1", "#p3"]</p>
<p>两者的区别在于位置filter的结果依赖于它前面的selector解析的结果，而其它  filter，只依赖于当前元素本身，就可以判断它是否满足filter。</p>
<p>那Sizzle是通过什么来判定进入哪一个流程呢，答案是origPOS的正则匹配,origPos指向了Expr中match对象的POS属性, 而POS中存储了五花八门的位置类约束，如下：</p>
<div>
<pre>/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/     //POS的值
</pre>
</div>
<p>这样一来，第一步的流程判断就已明朗。</p>
<h5>当处于1的情况时:<a name="当处于1的情况时"> </a></h5>
<p>首先根据需要对当前处理的A数组元素进行一系列修正操作（Expr.relative主刀）。然后调用posProcess函数对修复后的元素进行 匹配.</p>
<p>其中，还需一层判断，如果有层级约束，eg ‘&gt;,’:input’ 会转化为 ‘&gt;  :input’,因为在最初调用chunker进行预匹配的时候，这些是会被分割为单个数组元素的，但在这里需要将它们做一次合并，这是由 posProcess所处理的数据格式所决定的</p>
<p>源码片段a: — posProcess函数匹配核心</p>
<div>
<pre>
<div>
<div>//如果存在伪类选择符，从selector中移除，并保存在later中
// 这样一来，匹配对象便分离出来：selector（简单选择符存储器）和later（伪类选择符存储器）。
while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
    later += match[0];
    selector = selector.replace( Expr.match.PSEUDO, "" );
}
//构造selector，并调用Sizzle进行匹配,将结果存储在tmpSet中
selector = Expr.relative[selector] ? selector + "*" : selector;
for ( var i = 0, l = root.length; i &lt; l; i++ ) {
    Sizzle( selector, root[i], tmpSet );
}
// 最后便是filter的过滤
return Sizzle.filter( later, tmpSet );</div>
</div>
</pre>
</div>
<p>源码片段b: — 对预匹配后的数组A中元素的处理</p>
<div>
<pre>
<div>
<div>//这个为特例，被正则分割的A数组长度为2，则合并数组元素，上下文则原封不动为Sizzle传递进来的context。
if ( parts.length === 2 &amp;amp;&amp;amp; Expr.relative[ parts[0] ] ) {
    // 完成一次匹配， 由posProcess 内部调用 filter进行匹配
    // 但在匹配前，完成了一次连接选择符的操作
    // 存入set，注 set 当前还不是最终的结果，其这里的set和上面的tmpSet一样，都是一个"暂时性"的结果集
    set = posProcess( parts[0] + parts[1], context );</div>
</div>
</pre>
</div>
<p>源码片段c: — 如果存在位置约束关系， 正向匹配。</p>
<div>
<pre>
<div>
<div>set = Expr.relative[ parts[0] ] ?
    [ context ] :
    // 否则对队列首元素进行一次简单匹配操作
    Sizzle( parts.shift(), context );</div>
</div>
</pre>
</div>
<p>分析Expr.relative，可以看出，它包含了4种dom元素间关系的判断，分别是 “+”, “&gt;”, “”, “~”</p>
<p>每一轮的匹配，都会先判断A数组的首元素是不是代表tag间关系符(+,&gt;等) ，而做后续处理.同时对A数组进行循环，依次做类似的处理</p>
<p>源码片段d — 对A数组(parts)的循环处理及后续</p>
<div>
<pre>
<div>
<div>while ( parts.length ) {
    // 依次对 所匹配到的 数组中元素进行 递进匹配
    selector = parts.shift();
    //   '&gt;'  -&gt; '&gt;input' 的形式
    if ( Expr.relative[ selector ] )
        selector += parts.shift();

    set = posProcess( selector, set );</div>
</div>
</pre>
</div>
<h5>当处于2的情况时:<a name="当处于2的情况时"> </a></h5>
<p>就有着不同之处,先看小片代码</p>
<p>源码片段e: — 根据当前流程设置ret(两种情况)</p>
<div>
<pre>
<div>
<div>//为ret绑定正确的返回值
var ret = seed ?       //seed 为上一次调用sizzle返回值， 即前文中提到的set|tmpset
    //将预匹配后的A数组(parts)中的最后元素设置为ret的expr属性，set属性设为上一次匹配的结果集。
    { expr: parts.pop(), set: makeArray(seed) } :
    //如果是第一次调用，则进行匹配操作,调用find函数
    // 以parts数组最末元素为当前选择符，进行匹配操作，同时设置与之相关的context
    Sizzle.find( parts.pop(), parts.length === 1 &amp;amp;&amp;amp; context.parentNode ? context.parentNode : context, isXML(context) );</div>
</div>
</pre>
</div>
<p>2的情况为一般逻辑处理，从这小段代码便可得到Sizzle的匹配机制，每一次的调用都以数组末元素为基准，以上一次（或预设context）为上 下文约束关系以右到左的匹配,最后返回匹配结果。结合了DOM结构的特性，性能上也得到了大幅的提升。</p>
<p>我们知道选择器的类型是有效率差别的，id选择器效率最高，其次是class、name、tag、最后是最差的*表达式。在Sizzle.find 函数中，会按照这个效率的顺序查找元素，如果没有id就找class，依次下去。当然，class的支持需要方法 getElementsByClassName。如果没有，就只好从id跳到name。</p>
<div>
<pre>
<div>
<div>if ( document.getElementsByClassName &amp;amp;&amp;amp; document.documentElement.getElementsByClassName ) (function(){
    // ...
    // 如果支持直接获取，则将获取class的方法 直接添加进 Expr.order中   ['ID', 'NAME', 'TAG']
    Expr.order.splice(1, 0, "CLASS");
    //同时在find中追加对class的获取
    Expr.find.CLASS = function(match, context, isXML) {
        if ( typeof context.getElementsByClassName !== "undefined" &amp;amp;&amp;amp; !isXML ) {
            return context.getElementsByClassName(match[1]);
        }
    };
})();</div>
</div>
</pre>
</div>
<p>在Sizzle.find函数中，做了一系列的逻辑判断，来保证返回结果的正确性，首先在进入find时，保证了expr不为空的，然后根据表达式 类型(id|name|tag|class?)来选择与之对应的匹配分支进行实现，最后再做适当的收尾工作，将返回结果定义为对象，来移交给 filter,完成整个流程。</p>
<p>源码片段f: — find 函数核心</p>
<div>
<pre>
<div>
<div>//order: [ "ID", "NAME", "TAG" ]
// 当然，如果浏览器支持对class的直接获取时，order中就会出现class的相关匹配规则
for ( var i = 0, l = Expr.order.length; i &lt; l; i++ ) {
    var type = Expr.order[i], match;
    // 根据 type 对所传进来的expr 进行正则匹配
    // match中通过正则限制了这三类匹配方式的条件。
    // 1. ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
    // 2. NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
    // 3. TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
    if ( (match = Expr.match[ type ].exec( expr )) ) {
        var left = RegExp.leftContext;
        //保证返回结果的正确性，如果存在\，则删除
        if ( left.substr( left.length - 1 ) !== "\\" ) {
            match[1] = (match[1] || "").replace(/\\/g, "");
            // 根据type调用 sizzle.selector.find方法获取结果集。
            set = Expr.find[ type ]( match, context, isXML );
            if ( set != null ) {
                //如果匹配成功，删除已经匹配的expr
                expr = expr.replace( Expr.match[ type ], "" );
                break;
            }
        }
    }
}

return {set: set, expr: expr};
};</div>
</div>
</pre>
</div>
<p>在所返回的对象中，expr的作用便是为了辅佐filter这把大器所需要完成任务的工具,到此就可以调用Sizzle.filter对 ret.set再做一次精确匹配(匹配规则即ret.expr),以及tag间的位置约束关系的匹配（这部分同1中类似）.</p>
<p>源码片段g: — 和源码片段d有类似之处。不作详述</p>
<div>
<pre>
<div>
<div>    while ( parts.length ) {
        var cur = parts.pop(), pop = cur;
        // 是否存在 类似这样的匹配 eg:  '+',  '&gt;'等
        if ( !Expr.relative[ cur ] ) {
            cur = "";
        } else {
            //如果存在层间关系的约束  则修复 cur 和pop的指向
            // eg  ['div', '+', 'span'] =&gt;   pop = div;  cur = '+'; 并进入 relative的匹配。
            pop = parts.pop();
        }
        //  确保拥有上下文 代码略过
        Expr.relative[ cur ]( checkSet, pop, isXML(context) );
    }</div>
</div>
</pre>
</div>
<p>之后便接近sizzle尾声：结果集的处理(将所匹配的结果set 追加进 result中)。当然，如果有多表达式,便会再一次调用。</p>
<h3><strong>实例<a name="实例"> </a></strong></h3>
<p>以’div &gt; span p span:last’这个选择符为例，看看它的调用链是如何顺次完成的。</p>
<p>根据对源码的剖析，理解如下：</p>
<ol>
<li><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jquery</a>.init -&gt; <a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jquery</a>.prototype.find</li>
<li>进入Sizzle(对xml的判断) -&gt; 设置parts数组等在匹配中所需要的元素 -&gt;  根据数组长度以及调用origPos进行判断，来决定进入哪个分支，在这个实例下进入分支1</li>
<li>循环调用Sizzle进行匹配，将结果存入set中(因为在这一过程中是循环调用，所以对Sizzle的判断也是需要多次，进入哪一分支当然也会 是不一样的，比如第二轮循环判断则进入分支2中进行处理) ,对于&gt;号的处理，也会将它合并在其后的span中，构成新的选择符  ‘&gt;span’,然后进入Expr.relative进行匹配，同时调用posProcess。</li>
<li>调用Sizzle.find  匹配除伪类以外的部分(即这里的选择器不包含:last),首先会调用Expr.find的find方法来判断是否为哪一类匹配，在这一实例中，为TAG 匹配。</li>
<li>对从4步中生成的对象进行过滤,匹配’&gt;&#8217;(这一步的匹配是由Sizzle.filter触发，由Expr.relative完成),而在 匹配’span:last’时则由posProcess来触发，设置later值(:first)以及selector(span)，对span的匹配和 4步骤一样，重复匹配，而对:first的匹配则是第5步的重头戏，也就是调用Sizzle.filter来完成, 由此便生成了最后的匹配结果。</li>
</ol>
<p>对于有‘,’这样需要合并的选择器，Sizzle在获取结果后会按照文档流进行排序。所以，你可能会遇到这样的问题：把一个结果集append到新 的节点后，新的节点可能不会按照你书写的选择器的顺序出现。</p>
<p>以上，可以得出以下结论：大致通过如下步骤来完成：</p>
<div>
<pre>1.对表达式分组。
2.选择合适的处理顺序。
3.在当前的上下文里过滤要找的节点。并更新上下文。重复这一过程，直到结尾。
4.对结果排序，如果需要的话。
5.返回结果数组。
</pre>
</div>
<h3><strong>前向兼容<a name="前向兼容"> </a></strong></h3>
<h5>querySelectorAll<a name="Queryselectorall"> </a></h5>
<p>其实不止这一处，在Sizzle的<a href="http://wiki.github.com/jeresig/sizzle/">API手册</a>中Internal部分的find 函数（与filter构成了Sizzle的两把宝剑），在传递进该方法的参数可以用 <a href="http://www.w3.org/TR/selectors-api/">querySelectorAll()</a> （依赖于当前的浏览器执行环境） 直接获取时，它则直接调用该方法，既拥有了向前兼容的特性，又达到了速度的提升。</p>
<p>虽然有些环境实现了方法querySelectorAll，但是会有bug。</p>
<div>
<pre>
<div>
<div>//如果当前document 支持 querySelectorAll方法,则将浏览器可以完成的匹配完全交给浏览器
if ( document.querySelectorAll ) (function(){
    var oldSizzle = Sizzle;
    // 解决Safari bug 略过 ...
    Sizzle = function(query, context, extra, seed){
        context = context || document;

    // 因为querySelectorAll 在domElement 节点上操作时，存在bug 所以多了这样的判断
    // bug info: http://ejohn.org/blog/thoughts-on-queryselectorall/
        if ( !seed &amp;amp;&amp;amp; context.nodeType === 9 &amp;amp;&amp;amp; !isXML(context) ) {
            return makeArray( context.querySelectorAll(query), extra );
        }
        // querySelectorAll 可用则直接返回结果，否则才调用 sizzle
        return oldSizzle(query, context, extra, seed);
    };

    // oldSizzle 方法追加进 新的 Sizzle 中

})();</div>
</div>
</pre>
</div>
<p>对于任何一个开发者，我想，若浏览器原生已提供了实现方法，他都不会去高效而求繁琐吧。这一点在Sizzle中得到了充分的体现，总是尽可能的使用 相应环境下已实现的原生方法。所以在IE的低版本中(比如IE6)Sizzle的表现更加出众，在高级的浏览器中的对比却没有那么大的差别。</p>
<h3><strong>扩展<a name="扩展"> </a></strong></h3>
<p>如何定义自己的选择器呢.如果项目中频繁使用某些过滤规则，是不是把它作为一个选择器更有效呢。<br />
既然javascript的对象可以任意扩充，只要我们访问得到，那么我们就可以很轻松得创建出自己的选择器</p>
<p>在jQuery.expr.filter对象中，有很多内置的选择器，比如  ‘disabled’,&#8217;text’,那我们就扩充它,比如，想寻找包含span的div元素</p>
<div>
<pre>
<div>
<div>// filter的简写  ':'
jQuery.expr[":"] = jQuery.expr.filters;
$.extend($.expr[':'], {
    hasSpan: function(e) {
       return $(e).find('span').length &gt; 0;
    }
});</div>
</div>
</pre>
</div>
<p>这样，我们就拥有了 ‘:hasSpan’ 的选择器，使用当然和默认的一样。</p>
<div>
<pre>
<div>
<div>//直接用就可以了
$('div:hasSpan')....</div>
</div>
</pre>
</div>
<h3><strong>比较<a name="比较"> </a></strong></h3>
<p>再拾YUI3，在经过大幅度变化，以全新姿态出现，从选择器上的执行上效率不逊色于Sizzle几毫，初看YUI时就一直对它的模块细粒度化赞不绝 口，但是从如我这样的实用主义者的角度来看，选择器就应该是一个单独的模块，就如同jQuery分离而出的Sizzle。但在YUI  term眼里，为了让代码的组织结构看上去更加的理想化，更加具有”YUI3“的特色，将之在代码结构上又细分出一二三，比起Sizzle的简洁，它显得 太过学院派。</p>
<p>除此，在选择器的扩展上，sizzle表现胜于YUI3  selector，在实现css1~css3选择器的基础上，又对常用的功能进行了扩展。比如对表单元素快捷操作。据我所知，开发者对这类型选择器的使用 频率并不是想象中那么低。既然有了模块的细分，为什么不将这部分作为一个可扩充性的功能点模块融入框架中呢。Sizzle于开发者就如同一块可口味佳的点 心，满足我们各式各样的胃口，简洁，不失其功能的强劲，这点非常值得称道。</p>
<p>总得来看，Sizzle与YUI就好象一个面向实际与理想主义的比较。这里没有对错之分，从不同角度来看，都能略窥其各自的禅意。前者从如何为开发 者带来便利的角度考虑，让开发者实时觉得它的简单可信赖。后者，也寄托了自己对web的构想，如果浏览器原生全部支持css3-selector，那岂不 是完全不用引入该模块了，不过我想，真到那时候，各框架也都会有很大的变化了，只是我对这一天的到来抱有比较消极的态度，这是后话。</p>
<h3><strong>总结<a name="总结"> </a></strong></h3>
<p>本文从总体上讨论了jQuery之Sizzle选择器的实现原理，通过一个初步的流程分析，让各位读者对此有一个大致印象，毫无疑问，更深层次的匹 配，也只是它的递归调用，再匹配而已。</p>
<p>这里，没有做与其他框架在效率上的比较，如果你还对它的效率还有所怀疑的话，你可以<a href="http://yuilibrary.com/%7Emsweeney/yui-tests/slickspeed/">自行</a>比较。</p>
<p>如果你感兴趣，更推荐你继续去探索在1.4中着重优化的api源码，或许，会给你更多的启示</p>
<h3><strong>思考<a name="思考"> </a></strong></h3>
<p>从jQuery的角度来讲，Sizzle的出现随之也带来了web上的一些新的局面，在追求效率的同时，即使是这类单种子模式的库也是需要将之分离 开来，来设计成能够独立使用，独立维护的引擎。</p>
<p>从选择器的角度来讲，Sizzle这次算法的提升，我初步的结论是它结合了DOM这一特定的数据结构，使其每次的匹配能够更精准,以此获得引擎效率 上的提升。</p>
<p>我们可否多想想，在思维的开拓上能给我们留下多少财富。很多问题的解决，在换一种新的思维方式后，是不是常常会有柳暗花明的感觉呢。</p>
<h3><strong>相关参考：<a name="相关参考"> </a></strong></h3>
<p>W3C css selector:<a href="http://www.w3.org/TR/REC-CSS1/">CSS1</a>,<a href="http://www.w3.org/TR/CSS2/selector.html">CSS2</a>,<a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">CSS3</a></p>
<p><a href="http://www.blooberry.com/indexdot/css/supportkey/syntax.htm">CSS  Support History</a> -Brian Wilson</p>
<p><a href="http://kimblim.dk/css-tests/selectors/">CSS Selectors and  Pseudo Selectors and browser support</a> – kimblim.dk</p>
<p><a href="http://paulirish.com/2008/javascript-css-selector-engine-timeline/">Javascript  CSS Selector Engine Timeline</a> – Paul Irish</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/08/11/4907/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/08/11/4907/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/08/11/4907/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/08/11/4907/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/08/11/4907/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/08/11/4907/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>61个Javascript图片相册脚本</title>
		<link>http://www.iwanna.cn/archives/2010/08/11/4905/</link>
		<comments>http://www.iwanna.cn/archives/2010/08/11/4905/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 13:22:17 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Gallery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=4905</guid>
		<description><![CDATA[61个javascript图片相册脚本。涵盖Javascript幻灯片脚本、滑动门脚本、图片轮播循环展示、jquery相册展示插件以及各种漂亮的JS图片特效。 1. Imago (演示地址) 一个基于Mootools框架开发的AJAX Image Gallery 。 2. Dynamic Image Gallery and Slideshow (演示地址) 只有3kb大小的Ajax Image Gallery与Slideshow。 3. mooSlideBox (演示地址) MooSlideBox是一款基于ajax的小巧幻灯片特效工具，不同于其它LightBox，mooSlideBox采用底部弹出 碰撞 拖拽的效果。 4. Easy Slide EasySlide是以jQuery为基础开发的一个图库展示插件，EasySlide可以将任何一个网页容器(Container)内的图形自动 将其排列展示，并加上鼠标指向时的暂停效果(Pause)，可以当作图库展示或是动画及广告Banner使用。 5. ImageFlow 非常cool类于Flash效果图片查看器。 6. Image Gallery using Spry 一个使用spry框架开发，功能强大，易于集成到网站中使用的Web相册控件。 7. Image Link Image Link这个javascript能够为图片链接添加额外的样式，比如当鼠标移到某图片上时可以显示一张缩放小图标。 8. UvumiTools Gallery (演示地址) 采用Mootools框架开发的相册图片展示插件。图片加载进度提醒，能够按图片大小自动调整展示窗口大小，搜索引擎优化，多浏览器支持（ FireFox2 9. Hoverbox Image Gallery (演示地址) 这是一个采用纯CSS实现的照片Gallery。当鼠标经过时图片会自动放大。 [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.iwanna.cn/archives/2010/08/11/4905/" title="61个Javascript图片相册脚本">61个javascript图片相册脚本</a></strong>。涵盖Javascript幻灯片脚本、滑动门脚本、图片轮播循环展示、jquery相册展示插件以及各种漂亮的JS图片特效。</p>
<h4>1. <a href="http://imago.codeboje.de/">Imago</a> (<a href="http://codeboje.de/imago/samplegallery/">演示地址</a>)</h4>
<p><a href="http://imago.codeboje.de/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-16-14-34h.png" alt="Imago - Javascript图片相册脚本" /></a></p>
<p>一个基于Mootools框架开发的AJAX Image Gallery 。</p>
<h4>2. <a href="http://www.leigeber.com/2008/05/ajax-image-gallery-slideshow/">Dynamic  Image Gallery and Slideshow</a> (<a href="http://sandbox.leigeber.com/slideshow/">演示地址</a>)</h4>
<p><a href="http://www.leigeber.com/2008/05/ajax-image-gallery-slideshow/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-42-9f.jpg" alt="Dynamic Image Gallery and Slideshow - Javascript图片相册脚本" /></a></p>
<p>只有3kb大小的Ajax Image Gallery与Slideshow。</p>
<h4>3. <a href="http://www.artviper.net/test/ajaxslide/">mooSlideBox</a> (<a href="http://www.artviper.net/test/mooSlide2/index.html">演示地址</a>)</h4>
<p><a href="http://www.artviper.net/test/ajaxslide/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-16-13-56g.jpg" alt="mooSlideBox - Javascript图片相册脚本" /></a></p>
<p>MooSlideBox是一款基于ajax的小巧幻灯片特效工具，不同于其它LightBox，mooSlideBox采用底部弹出 碰撞  拖拽的效果。</p>
<h4>4. <a href="http://www.ezjquery.com/cgi-bin/webapp.rb?r=access">Easy  Slide</a></h4>
<p><a href="http://www.ezjquery.com/cgi-bin/webapp.rb?r=access"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-31-20c.jpg" alt="Easy Slide - Javascript图片相册脚本" /></a></p>
<p>EasySlide是以jQuery为基础开发的一个图库展示插件，EasySlide可以将任何一个网页容器(Container)内的图形自动 将其排列展示，并加上鼠标指向时的暂停效果(Pause)，可以当作图库展示或是动画及广告Banner使用。</p>
<h4>5. <a href="http://194.95.111.244/%7Ecountzero/scripts/_myImageFlow/">ImageFlow</a></h4>
<p><a href="http://194.95.111.244/%7Ecountzero/scripts/_myImageFlow/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-50-39l.jpg" alt="ImageFlow - Javascript图片相册脚本" /></a></p>
<p>非常cool类于Flash效果图片查看器。</p>
<h4>6. <a href="http://labs.adobe.com/technologies/spry/demos/gallery/index.html">Image  Gallery using Spry</a></h4>
<p><a href="http://labs.adobe.com/technologies/spry/demos/gallery/index.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-50-2k.jpg" alt="Image Gallery using Spry - Javascript图片相册脚本" /></a></p>
<p>一个使用spry框架开发，功能强大，易于集成到网站中使用的Web相册控件。</p>
<h4>7. <a href="http://cssglobe.com/lab/imagelink/">Image Link</a></h4>
<p><a href="http://cssglobe.com/lab/imagelink/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-48-27i.jpg" alt="Image Link - Javascript图片相册脚本" /></a></p>
<p>Image Link这个javascript能够为图片链接添加额外的样式，比如当鼠标移到某图片上时可以显示一张缩放小图标。</p>
<h4>8. <a href="http://tools.uvumi.com/gallery.html">UvumiTools Gallery</a> (<a href="http://tools.uvumi.com/gallery.html">演示地址</a>)</h4>
<p><a href="http://tools.uvumi.com/gallery.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-0-17-24h.jpg" alt="UvumiTools Gallery - Javascript图片相册脚本" /></a></p>
<p>采用Mootools框架开发的相册图片展示插件。图片加载进度提醒，能够按图片大小自动调整展示窗口大小，搜索引擎优化，多浏览器支持（ FireFox2</p>
<h4>9. <a href="http://sonspring.com/journal/hoverbox-image-gallery">Hoverbox  Image Gallery</a> (<a href="http://host.sonspring.com/hoverbox/">演示地址</a>)</h4>
<p><a href="http://sonspring.com/journal/hoverbox-image-gallery"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-47-36h.jpg" alt="Hoverbox Image Gallery - Javascript图片相册脚本" /></a></p>
<p>这是一个采用纯CSS实现的照片Gallery。当鼠标经过时图片会自动放大。</p>
<h4>10. <a href="http://www.twospy.com/galleriffic/">Galleriffic</a></h4>
<p><a href="http://www.twospy.com/galleriffic/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-9-10-28a.jpg" alt="Galleriffic - Javascript图片相册脚本" /></a></p>
<p>Galleriffic是一个用于创建快速展示相册中照片的jQuery插件。图片既可以以幻灯片的方式查看，也可以手动点击缩略图查看。 Galleriffic还支持分页，从而使得它能够展示更多的图片。</p>
<h4>11. <a href="http://devthought.com/barackslideshow-an-elegant-lightweight-slideshow-script/">BarackSlideshow</a> (<a href="http://devthought.com/wp-content/moogets/BarackSlideshow/demo.html">演 示地址</a>)</h4>
<p><a href="http://devthought.com/barackslideshow-an-elegant-lightweight-slideshow-script/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-9-0-48e.jpg" alt="BarackSlideshow - Javascript图片相册脚本" /></a></p>
<p>采用MooTools1.2开发，幻灯片效果展示图片的JScript程序。</p>
<h4>12. <a href="http://www.flashmoto.com/flash-galleries/papervision-3d-flash-gallery/">3D  Flash gallery</a> (<a href="http://www.flashmoto.com/wp-content/uploads/2008/11/papervision-gallery-project/index.html">演 示地址</a>)</h4>
<p><a href="http://www.flashmoto.com/flash-galleries/papervision-3d-flash-gallery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-16-21-8.jpg" alt="3D Flash gallery - Javascript图片相册脚本" /></a></p>
<p>这是一个能够以3D效果展示图片的Flash控件。基于Papervision 3D开发，使用XML作为数据库来存储图片信息。</p>
<h4>13. <a href="http://www.no-margin-for-errors.com/projects/prettyGallery/">prettyGallery</a> (<a href="http://www.no-margin-for-errors.com/projects/prettyGallery/#demo">演 示地址</a>)</h4>
<p><a href="http://www.no-margin-for-errors.com/projects/prettyGallery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-12-23-18d.jpg" alt="prettyGallery - Javascript图片相册脚本" /></a></p>
<p>prettyGallery是一个图库导航控件Slider。基于jQuery开发，除了可以导航图片之外，还支持其它任何内容。可以配置导航滚动 速度和图片标题说明。</p>
<h4>14. <a href="http://www.serie3.info/s3slider/">s3Slider</a> (<a href="http://www.serie3.info/s3slider/demonstration.html">演示地址</a>)</h4>
<p><a href="http://www.serie3.info/s3slider/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-12-27-13g.jpg" alt="s3Slider - Javascript图片相册脚本" /></a></p>
<p>s3Slider是一个jQuery slideshow插件</p>
<h4>15. <a href="http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm">Simple  Controls Gallery</a></h4>
<p><a href="http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-12-15-48k.jpg" alt="Simple Controls Gallery - Javascript图片相册脚本" /></a></p>
<p>这是一个采用jQuery开发的图片slideshow控件。提供一个暂停/播放/向前/向后展示的控制菜单。这个jQuery  slideshow可以设置当页面打开时自动播放图片并能够将最近查看的图片存储在cookie中。</p>
<h4>16. <a href="http://code.google.com/p/agile-carousel/">Agile  Carousel</a> (<a href="http://www.5bosses.com/examples/agile_carousel/multi_example/carousel.html">演 示地址</a>)</h4>
<p><a href="http://code.google.com/p/agile-carousel/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-29-14b.jpg" alt="Agile Carousel - Javascript图片相册脚本" /></a></p>
<p><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">Jquery</a> Slideshow插件。易于定制图片切换效果。提供开/关图片标题显示，添加文本水印等功能。</p>
<h4>17. <a href="http://james.padolsey.com/javascript/new-jquery-plugin-imgpreview/">imgPreview</a> (<a href="http://james.padolsey.com/demos/imgPreview/full/">演示地址</a>)</h4>
<p><a href="http://james.padolsey.com/javascript/new-jquery-plugin-imgpreview/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-12-11-17g.jpg" alt="imgPreview - Javascript图片相册脚本" /></a></p>
<p>图片预览jQuery插件。当鼠标移到图片链接上时，会在链接的旁边出现一个类似于tooltip效果的图片展示框。</p>
<h4>18. <a href="http://www.flashgallery.org/">flashgallery</a> (<a href="http://www.flashgallery.org/demo.html">演示地址</a>)</h4>
<p><a href="http://www.flashgallery.org/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-12-8-42d.jpg" alt="flashgallery - Javascript图片相册脚本" /></a></p>
<p>Flash Gallery是一个采用Macromedia Flash 2004开发的简单相册控件。使用XML文件来存储图片展示信息。</p>
<h4>19. <a href="http://odyniec.net/projects/imgareaselect/">imgAreaSelect</a></h4>
<p><a href="http://odyniec.net/projects/imgareaselect/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-39-37d.jpg" alt="imgAreaSelect - Javascript图片相册脚本" /></a></p>
<p>imgAreaSelect这个jQuery插件能够选取一张图片中一个矩形区域。</p>
<h4>20. <a href="http://deepliquid.com/content/Jcrop.html">Jcrop</a> (<a href="http://deepliquid.com/content/Jcrop_Examples.html">演示地址</a>)</h4>
<p><a href="http://deepliquid.com/content/Jcrop.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-23-18-37j.png" alt="Jcrop - Javascript图片相册脚本" /></a></p>
<p>Jcrop是一个jQuery插件，它能为你的WEB应用程序快速简单地提供图片裁剪的功能。</p>
<p><strong>特点：</strong></p>
<ul>
<li>对所有图片均unobtrusively（无侵入的，保持DOM简洁）</li>
<li>支持宽高比例锁定</li>
<li>支持minSize / maxSize设置</li>
<li>支持改变选区或移动选区时的回调（Callback）</li>
<li>支持用键盘微调选区</li>
<li>通过API创建互动，比如动画效果</li>
<li>支持CSS样式</li>
</ul>
<p><strong>支持的浏览器：</strong></p>
<ul>
<li>Firefox 2</li>
<li>Safari 3</li>
<li>Opera 9.5</li>
<li>Google Chrome 0.2</li>
<li>Internet Explorer 6</li>
</ul>
<h4>21. <a href="http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/">Image  Upload and Auto Crop</a> (<a href="http://www.webmotionuk.co.uk/jquery/image_upload_crop.php">演示地址</a>)</h4>
<p><a href="http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-38-54c.jpg" alt="Image Upload and Auto Crop - Javascript图片相册脚本" /></a></p>
<p>采用PHP jQuery开发的图片上传和剪切（Crop）工具。</p>
<h4>22. <a href="http://developer.yahoo.com/yui/examples/imagecropper/index.html">Yahoo!  UI Library ImageCropper</a> (<a href="http://developer.yahoo.com/yui/examples/imagecropper/simple_crop.html">演 示地址</a>)</h4>
<p><a href="http://developer.yahoo.com/yui/examples/imagecropper/index.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-10-37-39b.jpg" alt="Yahoo! UI Library ImageCropper - Javascript图片相册脚本" /></a></p>
<p>这是Yahoo! UI  Library中提供的一个图片剪裁工具。易于使用和定制，该ImageCropper自带一种默认的剪裁框外观，但可以使用CSS进行扩展和定制。</p>
<h4>23. <a href="http://tools.uvumi.com/crop.html">UvumiTools</a></h4>
<p><a href="http://tools.uvumi.com/crop.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-0-18-8i.jpg" alt="UvumiTools - Javascript图片相册脚本" /></a></p>
<p>UvumiTools是一个功能强大的图片剪裁控件，基于Mootools框架开发。可以配置图片剪裁最小尺寸，保持剪裁区域长宽比例，实时预览剪 裁图片等功能。</p>
<h4>24. <a href="http://www.nwhite.net/MooCrop/">MooCrop</a></h4>
<p><a href="http://www.nwhite.net/MooCrop/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-0-19-16j.jpg" alt="MooCrop - Javascript图片相册脚本" /></a></p>
<p>MooCrop是一个基于Mootools框架开发的图片剪切工具。</p>
<h4>25. <a href="http://www.sohtanaka.com/web-design/easy-toggle-jquery-tutorial/">Simple  Toggle Effect</a> (<a href="http://www.sohtanaka.com/web-design/examples/toggle/">演示地址</a>)</h4>
<p><a href="http://www.sohtanaka.com/web-design/easy-toggle-jquery-tutorial/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-17-58-40f.jpg" alt="Simple Toggle Effect - Javascript图片相册脚本" /></a></p>
<p>Simple Toggle Effect提供一种利用CSS与jQuery实现展开与收缩效果的简便方式。</p>
<h4>26. <a href="http://thisblog.usejquery.com/2009/03/18/create-a-unique-gallery-by-using-z-index-and-jquery/">Flipping  Image Gallery</a> (<a href="http://demos.usejquery.com/03_z-index_gallery/">演示地址</a>)</h4>
<p><a href="http://thisblog.usejquery.com/2009/03/18/create-a-unique-gallery-by-using-z-index-and-jquery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-17-57-50e.jpg" alt="Flipping Image Gallery - Javascript图片相册脚本" /></a></p>
<p>这个例子利用CSS</p>
<h4>27. <a href="http://matrix87.com/moostack/">mooStack</a></h4>
<p><a href="http://matrix87.com/moostack/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-3-4g.jpg" alt="mooStack - Javascript图片相册脚本" /></a></p>
<p>一个mootools插件,它提供一个容器,可以让图片层叠在一起。单击其中每一层的图片，可以让其在最前面展示。</p>
<h4>28. <a href="http://www.marcofolio.net/webdesign/creating_a_polaroid_photo_viewer_with_css3_and_jquery.html">Polaroid  Photo Viewer</a> (<a href="http://demo.marcofolio.net/polaroid_photo_viewer/">演示地址</a>)</h4>
<p><a href="http://www.marcofolio.net/webdesign/creating_a_polaroid_photo_viewer_with_css3_and_jquery.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-2-13f.jpg" alt="Polaroid Photo Viewer - Javascript图片相册脚本" /></a></p>
<p>这是一个基于CSS3与jQuery开发的照片查看工具。它可以让用户在页面上随着拖动照片，旋转照片等。</p>
<h4>29. <a href="http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/">Sliding  Boxes and Captions with jQuery</a> (<a href="http://buildinternet.com/live/boxes/">演示地址</a>)</h4>
<p><a href="http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-21-59-41c.jpg" alt="Sliding Boxes and Captions with jQuery - Javascript图片相册脚本" /></a></p>
<p>这是一个能够直接在图片表面添加标题说明的jQuery插件。当鼠标滑过图片时，标题备注能够以各种动画效果展现。</p>
<h4>30. <a href="http://www.addfullsize.com/">jQuery Fullsize</a></h4>
<p><a href="http://www.addfullsize.com/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-17-54-33b.jpg" alt="jQuery Fullsize - Javascript图片相册脚本" /></a></p>
<p>jQuery Fullsize这个插件允许在<img title="61个Javascript图片相册脚本" alt=" 61个Javascript图片相册脚本" />标签中加入一个longdesc属性来设置缩略图指向的具体图片。当鼠标移到缩略图表面时单击 放大按纽，就能够放大longdesc属性设置的图片。</p>
<h4>31. <a href="http://nettuts.com/tutorials/javascript-ajax/create-an-amazoncom-books-widget-with-jquery-and-xml/">jqueryBook</a> (<a href="http://nettuts.s3.amazonaws.com/152_jqueryBook/source/source/index.html">演 示地址</a>)</h4>
<p><a href="http://nettuts.com/tutorials/javascript-ajax/create-an-amazoncom-books-widget-with-jquery-and-xml/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-44-36c.jpg" alt="jqueryBook - Javascript图片相册脚本" /></a></p>
<p>基于jQuery实现的产品展示控件。提供导航控制按纽，提示产品详细信息的气泡。</p>
<h4>32. <a href="http://www.flash-gallery.org/">Flash Gallery</a> (<a href="http://www.flash-gallery.org/demo2.html">演示地址</a>)</h4>
<p><a href="http://www.flash-gallery.org/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-42-18a.jpg" alt="Flash Gallery - Javascript图片相册脚本" /></a></p>
<p>Flash  Gallery这个Flash相册能够从指定的文件夹或Flickr读取图片，然后以Slideshow的方式播放展示。播放窗体能够能够根据图片尺寸自 动调整大小，支持全屏放大显示。</p>
<h4>33. <a href="http://code.google.com/p/loopedslider/">loopedSlider</a> (<a href="http://nathansearles.com/loopedslider/example-3.html">演示地址</a>)</h4>
<p><a href="http://code.google.com/p/loopedslider/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-38-24i.jpg" alt="loopedSlider - Javascript图片相册脚本" /></a></p>
<p>jQuery Content Slider插件，支持循环播放。</p>
<h4>34. <a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html">slideViewer</a></h4>
<p><a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-35-41h.jpg" alt="slideViewer - Javascript图片相册脚本" /></a></p>
<p>利用这个jQuery插件，只需几行代码就能够将一组无序的图片列表转换成可导航控制的相册。</p>
<h4>35. <a href="http://www.efectorelativo.net/laboratory/viewer/">Viewer</a> (<a href="http://www.efectorelativo.net/laboratory/viewer/">演示地址</a>)</h4>
<p><a href="http://www.efectorelativo.net/laboratory/viewer/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-16-29-31d.jpg" alt="Viewer - Javascript图片相册脚本" /></a></p>
<p>Viewer是一个利用Mootools框架开发的图片和文本内容幻灯片放映控件（Slideshow）。支持手动与自动播放两种模式。</p>
<h4>36. <a href="http://www.marcofolio.net/webdesign/jslickmenu_a_jquery_plugin_for_slick_css3_menus.html">jSlickmenu</a> (<a href="http://demo.marcofolio.net/slick_jquery_css3_menu/default.html">演示 地址</a>)</h4>
<p><a href="http://www.marcofolio.net/webdesign/jslickmenu_a_jquery_plugin_for_slick_css3_menus.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-15-9-58d.jpg" alt="jSlickmenu - Javascript图片相册脚本" /></a></p>
<p>jSlickmenu是一个利用CSS3的一些特性（如：旋转、阴影）与jQuery实现的Slick  <a href="http://www.iwanna.cn/tags/menu/" class="st_tag internal_tag" rel="tag" title="标签 Menu 下的日志">menu</a>。jSlickmenu具有易于使用，外观cool，可定制等特性。</p>
<h4>37. <a href="http://coffeescripter.com/code/ad-gallery/">AD Gallery</a> (<a href="http://coffeescripter.com/code/ad-gallery/">演示地址</a>)</h4>
<p>AD  Gallery是一个带缩略图导航浏览，可设置照片标题和备注说明信息的jQuery相册插件。可以定义照片切换效果（左右交替，落下，淡入淡出，放大/ 缩小交替等）。照片展示框会根据实际照片大小自动调整。</p>
<h4>38. <a href="http://sixrevisions.com/demo/imagecaption/ImageCaption.html">ImageCaption</a> (<a href="http://sixrevisions.com/freebies/scripts/imagecaption-a-mootools-plugin-for-auto-captioning-images/">演 示地址</a>)</h4>
<p><a href="http://sixrevisions.com/demo/imagecaption/ImageCaption.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-20-25-2.jpg" alt="ImageCaption - Javascript图片相册脚本" /></a></p>
<p>ImageCaption是一个MooTools1.2 插件用于为页面中的image元素添加带边框的标题说明。边框样式可以自己定义。</p>
<h4>39. <a href="http://famspam.com/facebox">Facebox</a></h4>
<p><a href="http://famspam.com/facebox"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-20-33-4d.jpg" alt="Facebox - Javascript图片相册脚本" /></a></p>
<p>Facebox是一个基于jQuery，Facebook-style的lightbox。能够展示示images，divs或者整个远程页面。</p>
<h4>40. <a href="http://www.eogallery.com/">EOGallery</a></h4>
<p>基本EOGallery是一个基于jQuery的幻灯片插件  。它仅使用jQuery的基本功能和Cody Lindley’s Thickbox来显示较大的图片。而且， EOGallery遵循严格XHTML 1.0和CSS标准，它支持Firefox ， Safari， Internet Explorer  6,甚至在不支持JavaScript/或不支持的CSS的浏览器有较好表现。</p>
<h4>41. <a href="http://www.playgoogle.com/post/74.html">Jquery图片幻灯效果</a></h4>
<p><a href="http://www.playgoogle.com/post/74.html"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-35-48.jpg" alt="Jquery图片幻灯效果 - Javascript图片相册脚本" /></a></p>
<p>基于Jquery的图片幻灯效果</p>
<h4>42. <a href="http://www.spaceforaname.com/jquery/galleryview/">GalleryView</a></h4>
<p>jQuery的一个灵活美观的内容画廊插件，非常易于管理和定制</p>
<h4>43. <a href="http://freshcutsd.com/yui-slideshow/">YUI Slideshow</a> (<a href="http://freshcutsd.com/yui-slideshow/#demo">演示地址</a>)</h4>
<p><a href="http://freshcutsd.com/yui-slideshow/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-21-57-23a.jpg" alt="YUI Slideshow - Javascript图片相册脚本" /></a></p>
<p>YUI  Slideshow是YUI3的一个扩展模块，它能够将任意HTML元素的子元素转换一个可定制的Slideshow。该模块提供播放/暂停/向后/向前 等控制，能够很方便创建一个播放器界面。支持10几种切换效果。</p>
<h4>44. <a href="http://jonraasch.com/blog/a-simple-jquery-slideshow">A  Simple jQuery Slideshow</a></h4>
<p><a href="http://jonraasch.com/blog/a-simple-jquery-slideshow"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-21-58-33b.jpg" alt="A Simple jQuery Slideshow - Javascript图片相册脚本" /></a></p>
<p>A Simple jQuery Slideshow是一个利用jQuery  少量CSS实现的简单图片幻灯片播放插件。图片之间的切换采用淡入淡出的效果。</p>
<h4>45. <a href="http://pwi.googlecode.com/">Picasa Web Album Integrator</a> (<a href="http://www.multiprof.nl/pwi/jquery_plugin/index.html">演示地址</a>)</h4>
<p><a href="http://pwi.googlecode.com/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-23-58-30a.jpg" alt="Picasa Web Album Integrator - Javascript图片相册脚本" /></a></p>
<p>PWI这个jQuery插件让你可以将你的Picasa Web相册集成到你自己的的网站或博客中。让用户不会觉得你的相册是放在Google中。</p>
<h4>46. <a href="http://css-tricks.com/anythingslider-jquery-plugin/">AnythingSlider</a> (<a href="http://css-tricks.com/examples/AnythingSlider/">演示地址</a>)</h4>
<p><a href="http://css-tricks.com/anythingslider-jquery-plugin/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-1-56a.jpg" alt="AnythingSlider - Javascript图片相册脚本" /></a></p>
<p>AnythingSlider是一个jQuery  Slider插件，可以展示任意HTML内容。提供向前/向后滑动操作，能够自动添加分页导航Tab，可以随意启动自动播放功能。</p>
<h4>47. <a href="http://www.hieu.co.uk/blog/index.php/tabswitch/">tabSwitch</a> (<a href="http://www.hieu.co.uk/blog/index.php/tabswitch/example/">演示地址</a>)</h4>
<p><a href="http://www.hieu.co.uk/blog/index.php/tabswitch/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-18-45-41h.jpg" alt="tabSwitch - Javascript图片相册脚本" /></a></p>
<p>tabSwitch是一个能够帮助开发人员轻松创建Tabs与sliders的jQuery插件。有7种效果2种样式可供选择。tabSwitch 可以自动或手动播放每一个tab/slide。</p>
<h4>48. <a href="http://www.flabell.com/flash/XML-Image-Slideshow-40">XML  Image Slideshow</a></h4>
<p><a href="http://www.flabell.com/flash/XML-Image-Slideshow-40"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-12-1-29j.jpg" alt="XML Image Slideshow - Javascript图片相册脚本" /></a></p>
<p>采用flash xml构建的幻灯片插件,它的控制栏会根据图片的颜色而自动改变.</p>
<h4>49. <a href="http://jqueryglobe.com/article/simple-image-viewer">Simple  Image Viewer</a></h4>
<p><a href="http://jqueryglobe.com/article/simple-image-viewer"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-14-18-15c.jpg" alt="Simple Image Viewer - Javascript图片相册脚本" /></a></p>
<p>利用jQuery内置的slideUp与slideDown方法创建一个简单的图片查看器。</p>
<h4>50. <a href="http://tutsvalley.com/tutorials/making-an-infinite-jquery-carousel/">Making  an infinite JQuery carousel</a> (<a href="http://tutsvalley.com/demos/carousel.html">演示地址</a>)</h4>
<p><a href="http://tutsvalley.com/tutorials/making-an-infinite-jquery-carousel/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-14-19-15d.jpg" alt="Making an infinite JQuery carousel - Javascript图片相册脚本" /></a></p>
<p>利用jQuery，以一种简单的方式实现一个类似于走马灯似的图片更迭jQuery插件。</p>
<h4>51. <a href="http://pikachoose.com/">Pikachoose</a> (<a href="http://pikachoose.com/demo/">演示地址</a>)</h4>
<p><a href="http://pikachoose.com/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-0-2-45e.jpg" alt="Pikachoose - Javascript图片相册脚本" /></a></p>
<p>Pikachoose是一个基于jquery的轻量 级相册插件,它允许用户自定义幻灯片,按钮,自动播放.</p>
<h4>52. <a href="http://buildinternet.com/2009/08/crafting-an-animated-postcard-with-jquery/">Crafting  an Animated Postcard With jQuery</a> (<a href="http://buildinternet.com/live/postcard/">演示地址</a>)</h4>
<p><a href="http://buildinternet.com/2009/08/crafting-an-animated-postcard-with-jquery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-21-2-7d.jpg" alt="Crafting an Animated Postcard With jQuery - Javascript图片相册脚本" /></a></p>
<p>利用jQuery创建一张生动的贺卡。</p>
<h4>53. <a href="http://www.newmediacampaigns.com/page/jcaption-a-jquery-plugin-for-simple-image-captions">jCaption</a> (<a href="http://www.newmediacampaigns.com/files/posts/jcaption/index.html">演 示地址</a>)</h4>
<p><a href="http://www.newmediacampaigns.com/page/jcaption-a-jquery-plugin-for-simple-image-captions"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-21-3-37e.jpg" alt="jCaption - Javascript图片相册脚本" /></a></p>
<p>jCaption这个jQuery插件可以用于为图片添加透明的浮动框来标注标题信息。</p>
<h4>54. <a href="http://jqueryglobe.com/article/slide-thumbs">Slide  Thumbs</a> (<a href="http://jqueryglobe.com/labs/slide_thumbs/">演示地址</a>)</h4>
<p><a href="http://jqueryglobe.com/article/slide-thumbs"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-45-51a.jpg" alt="Slide Thumbs - Javascript图片相册脚本" /></a></p>
<p>这个示例介绍了如何利用jQuery实现一个漂亮的图片查看控件。</p>
<h4>55. <a href="http://tutorialzine.com/2009/09/cool-jquery-gallery/">Making  a Really Cool jQuery Gallery</a> (<a href="http://demo.tutorialzine.com/2009/09/cool-jquery-gallery/demo.php">演 示地址</a>)</h4>
<p><a href="http://tutorialzine.com/2009/09/cool-jquery-gallery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-8-57-24b.jpg" alt="Making a Really Cool jQuery Gallery - Javascript图片相册脚本" /></a></p>
<p>Making a Really Cool jQuery  Gallery利用PHP扫描某一目录下的所有图片，然后用CSS、jQuery和jQuery Lightbox插件生成一个漂亮的相册。</p>
<h4>56. <a href="http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/">Greyscale  Hover Effect w/ CSS</a></h4>
<p><a href="http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-41-15b.jpg" alt="Greyscale Hover Effect w/ CSS - Javascript图片相册脚本" /></a></p>
<p>利用CSS Sprites技术和少量jQuery代码实现鼠标移到图片上，能够让图片变成灰白色,移开后还原。</p>
<h4>57. <a href="http://developer.yahoo.com/yui/carousel/">YUI Library:  Carousel Control</a> (<a href="http://developer.yahoo.com/yui/examples/carousel/index.html">演示地址</a>)</h4>
<p><a href="http://developer.yahoo.com/yui/carousel/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-53-30b.jpg" alt="YUI Library: Carousel Control - Javascript图片相册脚本" /></a></p>
<p>这个YUI Carousel Control控件可以用于在一个有限的页面区域中浏览一组以水平或垂直的方式放置图片。</p>
<h4>58. <a href="http://webdesignledger.com/tutorials/create-a-resizable-image-grid-with-jquery">Create  a Resizable Image Grid with jQuery</a> (<a href="http://demos.webdesignledger.com/jquery_image_grid/example2.htm">演 示地址</a>)</h4>
<p><a href="http://webdesignledger.com/tutorials/create-a-resizable-image-grid-with-jquery"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-58-36c.jpg" alt="Create a Resizable Image Grid with jQuery - Javascript图片相册脚本" /></a></p>
<p>利用jQuery创建一个通过拖动滑块来放大或缩小一组图片的插件。</p>
<h4>59. <a href="http://dev.victorstanciu.ro/prototype/carousel/">Prototype  Carousel</a></h4>
<p><a href="http://dev.victorstanciu.ro/prototype/carousel/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-52-24a.jpg" alt="Prototype Carousel - Javascript图片相册脚本" /></a></p>
<p>基于Prototype和Script.aculo.us框架开发的图片幻灯切换程序，带左右滑动，并有滑动特效。</p>
<h4>60. <a href="http://www.sohtanaka.com/web-design/animate-navigation-with-css-jquery/">Animated  Navigation with CSS</a> (<a href="http://www.sohtanaka.com/web-design/examples/fancy-navigation/">演示 地址</a>)</h4>
<p><a href="http://www.sohtanaka.com/web-design/animate-navigation-with-css-jquery/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-23-0-18e.jpg" alt="Animated Navigation with CSS - Javascript图片相册脚本" /></a></p>
<p>利用CSS jQuery实现一个具有动画效果的导航条。当鼠标移过某个菜单项时，会出现翻滚的效果。</p>
<h4>61. <a href="http://www.prototype-ui.com/">Prototype UI Carousel</a></h4>
<p><a href="http://www.prototype-ui.com/"><img title="61个Javascript图片相册脚本" src="http://images.uheed.com/iwanna/2010/08/11/jquery-gallary/javascript-22-59-8d.jpg" alt="Prototype UI Carousel - Javascript图片相册脚本" /></a></p>
<p>Carousel非常适合于在博客或网站中展示相册中的照片，该控件当前支持静态或利用Ajax获取的内容，支持水平和垂直两种展示方式。</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/08/11/4905/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/08/11/4905/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/08/11/4905/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/08/11/4905/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/08/11/4905/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/08/11/4905/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery中的AJAX全局事件详解</title>
		<link>http://www.iwanna.cn/archives/2010/08/10/4888/</link>
		<comments>http://www.iwanna.cn/archives/2010/08/10/4888/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 04:57:34 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=4888</guid>
		<description><![CDATA[jQuery在AJAX方面是非常强大和方便的，以下是jQuery进行AJAX请求时方法模板： $.ajax({ type: &#8220;get&#8221;, url: &#8220;&#8221;, data : {}, beforeSend : function(){ }, success : function(data){ }, complete : function(){ } }); 关于$.ajax()方法的使用，不是明河写这篇文章的目的，今天明河主要讲解当进行AJAX请求时整个完整的事件流程。 jquery的AJAX方法的全部全局事件： ajaxStart：ajax请求开始前 ajaxSend：ajax请求时 ajaxSuccess：ajax获取数据后 ajaxComplete：ajax请求完成时 ajaxError：ajax请求发生错误后 ajaxStop：ajax请求停止后 当你使用jquery的ajax方法,不管是$.ajax()、$.get()、$.load()、$.getJSON()等都会默认触发全局事件，只是通常不绑定全局事件，但实际上这些全局事件非常有用处。 ajax方法的全局事件的用处 ajax全局事件，有个典型的应用场合： 你的页面存在多个甚至为数不少的ajax请求，但是这些ajax请求都有相同的消息机制。ajax请求开始前显示一个提示框，提示“正在读取数据“；ajax请求成功时提示框显示“数据获取成功”；ajax请求结束后隐藏提示框。 不使用全局事件的做法是： 给$.ajax()加上beforeSend、success、complete回调函数，在回调函数中加上处理提示框。 使用全局事件的做法是： $(document).ajaxStart(onStart) .ajaxComplete(onComplete) .ajaxSuccess(onSuccess); function onStart(event) { //&#8230;.. } function onComplete(event, xhr, settings) { //&#8230;.. } function onSuccess(event, xhr, [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery在AJAX方面是非常强大和方便的，以下是jQuery进行AJAX请求时方法模板：</p>
<ol>
<li>$.<a href="http://www.iwanna.cn/tags/ajax/" class="st_tag internal_tag" rel="tag" title="标签 Ajax 下的日志">ajax</a>({</li>
<li> type: &#8220;get&#8221;,</li>
<li> url: &#8220;&#8221;,</li>
<li> data : {},</li>
<li> beforeSend : function(){</li>
<li></li>
<li> },</li>
<li> success : function(data){</li>
<li></li>
<li> },</li>
<li> complete : function(){</li>
<li></li>
<li> }</li>
<li> });</li>
</ol>
<p><span id="more-4888"></span><br />
关于$.ajax()方法的使用，不是明河写这篇文章的目的，今天明河主要讲解当进行AJAX请求时整个完整的事件流程。</p>
<h4>jquery的AJAX方法的全部全局事件：</h4>
<ul>
<li>ajaxStart：ajax请求开始前</li>
<li>ajaxSend：ajax请求时</li>
<li>ajaxSuccess：ajax获取数据后</li>
<li>ajaxComplete：ajax请求完成时</li>
<li>ajaxError：ajax请求发生错误后</li>
<li>ajaxStop：ajax请求停止后</li>
</ul>
<p>当你使用jquery的ajax方法,不管是$.ajax()、$.get()、$.load()、$.getJSON()等都会默认触发全局事件，只是通常不绑定全局事件，但实际上这些全局事件非常有用处。</p>
<h4>ajax方法的全局事件的用处</h4>
<p>ajax全局事件，有个典型的应用场合：<br />
你的页面存在多个甚至为数不少的ajax请求，但是这些ajax请求都有相同的消息机制。ajax请求开始前显示一个提示框，提示“正在读取数据“；ajax请求成功时提示框显示“数据获取成功”；ajax请求结束后隐藏提示框。<br />
<strong>不使用全局事件的做法是：</strong><br />
给$.ajax()加上beforeSend、success、complete回调函数，在回调函数中加上处理提示框。<br />
<strong>使用全局事件的做法是：</strong></p>
<ol>
<li>$(document).ajaxStart(onStart)</li>
<li> .ajaxComplete(onComplete)</li>
<li> .ajaxSuccess(onSuccess);</li>
<li></li>
<li> function onStart(event) {</li>
<li> //&#8230;..</li>
<li> }</li>
<li> function onComplete(event, xhr, settings) {</li>
<li> //&#8230;..</li>
<li> }</li>
<li> function onSuccess(event, xhr, settings) {</li>
<li> //&#8230;..</li>
<li> }</li>
</ol>
<h4>ajax方法完整事件流</h4>
<p>为了更直观的说明，明河使用Axure画了二个流程图，画的不好还请见谅，O(∩_∩)O<br />
<a href="http://www.iwanna.cn/" alt="我想网" target="_blank"><img title="ajax-events-1" src="http://images.uheed.com/iwanna/2010/08/10/ajax-events-1.png" alt="" width="601" height="277" /></a><br />
<a href="http://www.iwanna.cn/" alt="我想网" target="_blank"><img title="ajax-events-2" src="http://images.uheed.com/iwanna/2010/08/10/ajax-events-2.png" alt="" width="600" height="281" /></a></p>
<h4>AJAX方法完整事件流演示</h4>
<p>为了让朋友更容易理解整个事件流，明河做了以下demo。</p>
<ul>
<li class="l"><a href="http://www.iwanna.cn/examples/js/jqueryAjax/" class="btn-view-demo" target="_blank">查看示例</a></li>
<li class="l"><a href="http://www.iwanna.cn/examples/js/jqueryAjax/jqueryAjax.rar" title="jQuery中的AJAX方面的方法所触发的完整事件流演示" class="btn-download">点此下载</a></li>
</ul>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/08/10/4888/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/08/10/4888/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/08/10/4888/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/08/10/4888/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/08/10/4888/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/08/10/4888/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery弹出框wBox的一个使用实例</title>
		<link>http://www.iwanna.cn/archives/2010/08/09/4872/</link>
		<comments>http://www.iwanna.cn/archives/2010/08/09/4872/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 15:10:35 +0000</pubDate>
		<dc:creator>seasun</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.iwanna.cn/?p=4872</guid>
		<description><![CDATA[公司网站越来越多的使用了wBox，比如最新的产品普加邻居，封装了wBox(jQuery的一款弹出框插件)，房产展示页面的房贷计算器采用的就是wBox，搜索结果页面采用的也是wBox，但是相对于其他页 面，搜索结果页面每一个li下面会有三个不同的wBox样式，我不可能每个都是手写一段wBox代码吧~ 鼠标划上去显示wBox的三个触发链接 经过一番的研究，觉得可以通过下面的代码就解决这个问题： $.each($('a[rel*=wBox]'),function(key,value){ var $t = $(this),name = this.title, url = this.href, type = $t.attr("type"), geo = $t.attr("geo") var str = ""; switch (type) { case "map"://地图 $(this).wBox({requestType:"iframe",target:url,title:name,iframeWH:{width:570,height:370}}); break; case "video"://视频 $(this).wBox({requestType:"iframe",target:url,title:name,iframeWH:{width:497,height:378}}); break; case "bus"://公交驾车 str = '&#60;div&#62;'; var briefTit = name.substring(0, 12) + (name.length &#62; 12 ? "..." : ""); str += [...]]]></description>
			<content:encoded><![CDATA[<p>公司网站越来越多的使用了<a href="http://www.js8.in/wbox" target="_blank">wBox</a>，比如最新的产品<a href="http://linju.pujia.com/" target="_blank">普加邻居</a>，封装了wBox(<strong><a href="http://www.iwanna.cn/tags/jquery/" class="st_tag internal_tag" rel="tag" title="标签 JQuery 下的日志">jQuery</a></strong>的一款弹出框插件)，房产展示页面的房贷计算器采用的就是<strong>wBox</strong>，搜索结果页面采用的也是wBox，但是相对于其他页 面，搜索结果页面每一个li下面会有三个不同的wBox样式，我不可能每个都是手写一段<strong>wBox代码</strong>吧~<br />
<a href="http://images.uheed.com/iwanna/2010/08/09/pop-up-box3.jpg" target="_blank"><img title="鼠标划上去显示wBox的三个触发链接" src="http://images.uheed.com/iwanna/2010/08/09/pop-up-box3.jpg" alt="鼠标划上去显示wBox的三个触发链接" width="300" height="133" /></a>鼠标划上去显示wBox的三个触发链接<br />
<span id="more-4872"></span><br />
经过一番的研究，觉得可以通过下面的代码就解决这个问题：</p>
<pre>$.each($('a[rel*=wBox]'),function(key,value){
var $t = $(this),name = this.title, url = this.href,  type = $t.attr("type"), geo = $t.attr("geo")
var str = "";
switch (type) {
    case "map"://地图
        $(this).wBox({requestType:"iframe",target:url,title:name,iframeWH:{width:570,height:370}});
        break;
    case "video"://视频
        $(this).wBox({requestType:"iframe",target:url,title:name,iframeWH:{width:497,height:378}});
        break;
    case "bus"://公交驾车
        str = '&lt;div&gt;';
        var briefTit = name.substring(0, 12) + (name.length &gt; 12 ? "..." : "");
        str += '&lt;div&gt;&lt;div&gt;到这里来&lt;/div&gt;&lt;div&gt;&lt;div&gt;出发地：&lt;input type="text" id="FHinput"/&gt;&lt;/div&gt;&lt;div&gt;目的地：' + briefTit + '&lt;/div&gt;&lt;div&gt;&lt;input id="FHbus" type="button" value="公交方案" onclick="map.toHere($(\'#FHinput\').val(),\'青岛\',\'b\',\'' + geo + '\',\'' + name + '\',\'FHinput\');return false;"/&gt;&lt;input id="FHdr" type="button" value="驾车导航" onclick="map.toHere($(\'#FHinput\').val(),\'青岛\',\'d\',\'' + geo + '\',\'' + name + '\',\'FHinput\');return false;"/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;';
        str += '&lt;div&gt;&lt;div&gt;从这里出发&lt;/div&gt;&lt;div&gt;&lt;div&gt;出发地：' + briefTit + '&lt;/div&gt;&lt;div&gt;目的地：&lt;input type="text"  id="THinput" /&gt;&lt;/div&gt;&lt;div&gt;&lt;input id="THbus" type="button" value="公交方案" onclick="map.fromHere($(\'#THinput\').val(),\'青岛\',\'b\',\'' + geo + '\',\'' + name + '\',\'THinput\');return false;"/&gt;&lt;input id="THdr" type="button" value="驾车导航" onclick="map.fromHere($(\'#THinput\').val(),\'青岛\',\'d\',\'' + geo + '\',\'' + name + '\',\'THinput\');return false;"/&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;';
        $(this).wBox({html:str,title:name});
        break;
}
});</pre>
<p>看看效果吧~<br />
<a href="http://images.uheed.com/iwanna/2010/08/09/pop-up-box2.jpg" target="_blank"><img title="公交驾车wBox的弹出框" src="http://images.uheed.com/iwanna/2010/08/09/pop-up-box2.jpg" alt="公交驾车wBox的弹出框" width="300" height="191" /></a>公交驾车wBox的弹出框</p>
<p><a href="http://images.uheed.com/iwanna/2010/08/09/pop-up-box3.jpg" target="_blank"><img title="地图部分的wBox弹出框" src="http://images.uheed.com/iwanna/2010/08/09/pop-up-box3.jpg" alt="地图部分的wBox弹出框" width="300" height="216" /></a>地图部分的wBox弹出框</p>
<p>P.S.：其实换一种思考的方法，多想想应该会有更好的解决方法</p>
<hr />
<p>© <a href="http://www.iwanna.cn">我想网</a> Akon 所有 , 2010. |
<a href="http://www.iwanna.cn/archives/2010/08/09/4872/">永久链接</a> |
<a href="http://www.iwanna.cn/archives/2010/08/09/4872/#comments">没有评论</a> |
提交到
<a rel="nofollow" target="_blank" href="http://www.google.com/reader/view/feed/http://www.iwanna.cn/archives/2010/08/09/4872/">Google Reader</a>
<a rel="nofollow" target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://www.iwanna.cn/archives/2010/08/09/4872/">鲜果</a>
<a rel="nofollow" target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://www.iwanna.cn/archives/2010/08/09/4872/">抓虾</a>
<hr />
<script type="text/javascript"><!--
google_ad_client = "pub-2057344547305288";
/* 336x280,iwanna feed,created 10/3/10 */
google_ad_slot = "9738886183";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<hr />
</p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwanna.cn/archives/2010/08/09/4872/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

