<?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>UEDspace &#187; jquery</title>
	<atom:link href="http://www.uedspace.com/cat/js/jquery/feed" rel="self" type="application/rss+xml" />
	<link>http://www.uedspace.com</link>
	<description>专注于web前端开发、关注用户体验。</description>
	<lastBuildDate>Thu, 17 Nov 2011 03:27:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>jQuery1.5的改进细节</title>
		<link>http://www.uedspace.com/blog/313.html</link>
		<comments>http://www.uedspace.com/blog/313.html#comments</comments>
		<pubDate>Thu, 10 Feb 2011 02:43:25 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=313</guid>
		<description><![CDATA[<a href="http://www.uedspace.com/blog/313.html" title="jQuery1.5的改进细节"></a>jQuery 1.5 beta1出来了，从学习跟进上来说，这一次已经比较晚了（我竟然不知道1.5什么时候出的alpha，就这么beta了）。 这个1.5版本最大的更新是AJAX的完全重写，提供了更强的可扩展性。但是受制于精力和篇幅，对新的AJAX的分析还是放到下回，本篇先简单介绍一下细节方面的改进。 jQuery._Deferred和jQuery.Deferred 首先不得不说这两个新生事物，因为他们是作为基础设施存在，不把这两个东西讲明白了，有些问题根本没办法解释。 首先，jQuery.Deferred是jQuery._Deferred的增强版，因此对于这个问题，从jQuery._Deferred入手，就能说明一大半的问题。 什么是Deferred？从字面上看，我的第一反应是“延迟加载”，首字母大写的应该是“类型”的定义，所以这大概是一个“透明提供延迟加载功能”的类型吧。然而实际上，虽然确实带有那么一点点“延迟”的意思，这个东西却不是用来实现延迟加载的。 简单来说，jQuery._Deferred是一个函数队列，他的作用有以下几点： 保存若干个函数。 在特定的时刻把保存着的函数全部执行掉。 执行过后，新进来的函数会立刻执行。 感觉是不是和啥东西很像？对，jQuery的ready函数就是这样的逻辑，实际中jQuery 1.5中的ready函数也确实被嫁接到这上面去了。 jQuery._Deferred提供下面的接口： done：function(fn1, fn2, …)的形式，用于把函数添加到队列中。 fire：function(context, args)的形式，使用context指定this对象，args指定参数，调用队列中所有函数。fire被调用后，_Deferred会进入isResolved状态，未来对done的调用不会再保存函数，而是直接调用函数。 resolve：相当于调用fire(this, arguments)，一个简化的方法。 isResolved：用来判断_Deferred是否在isResolved状态，具体参考前面的fire函数的解释。 cancel：取消掉整个队列，这样不管未来是不是fire，队列中的函数都不会再被调用。 说明白了jQuery._Deferred，再来看看jQuery.Deferred。这个东西其实就是2个_Deferred组成的，第一个称为deferred，用于保管“正常”状态下的函数；第二个称为failDeferred，用于保管“出错”状态下的函数。同时jQuery.Deferred提供了一些新的接口： then：function(done, fail)的形式，把done添加进deferred，把fail添加进failedDeferred。 fail：相当于failDeferred的done函数。 fireReject：相当于failDeferred的fire函数。 reject：相当于failDeferred的resolve函数。 isRejected：相当于failDeferred的isResolved函数。 同时jQuery.Deferred取消了cancel函数。 那么这个是啥用的呢？有“正常”和“出错”2个状态，同时又是异步的，很容易就能想到……对，给AJAX用的，在下一篇分析中再详细说明。 jQuery.ready的变化 因为有了jQuery._Deferred这个东西，jQuery.ready函数变成依赖于函数队列，具体的变化有： 原来的readyList变量已经不再是一个数组，而变成了jQuery._Deferred对象。 原本在DOMContentLoaded时，调用readList中所有函数的逻辑，现在也使用了jQuery._Deferred中，原来的代码： while ( (fn &#8230;<p class="read-more"><a href="http://www.uedspace.com/blog/313.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/313.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.5发布 Ajax模块重写</title>
		<link>http://www.uedspace.com/blog/310.html</link>
		<comments>http://www.uedspace.com/blog/310.html#comments</comments>
		<pubDate>Thu, 10 Feb 2011 02:15:06 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=310</guid>
		<description><![CDATA[<a href="http://www.uedspace.com/blog/310.html" title="jQuery 1.5发布 Ajax模块重写"></a>美国时间1月31日John Resig在jQuery官方博客发表文章，宣布jQuery 1.5正式版已经如期开发完成，可以下载使用。压缩版本jQuery Minified 29KB，不压缩版本jQuery Regular（用于阅读和调试）207KB。由于jQuery已经成为目前最流行的JavaScript库，得到广泛的支持，新版本的发布当然非常引人注目。 jQuery创始人John Resig在CSDN TUP活动上演讲（相关报道） 另外，微软和Google也为jQuery 1.5提供了CDN支持，可以直接导入： 微软：http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.min.js Google：https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js （发稿时为止尚未上线） 新版本的主要改进可以参见变更日志：http://api.jquery.com/category/version/1.5/。 John Resig总结了几点比较引人注目的变化。 1. Ajax重写 Ajax模块完全进行了重写。新增一个jXHR对象，为不同浏览器内置的XMLHttpRequest提供了一致的超集。对于XMLHttpRequest之外的传输机制，比如JSONP请求，jXHR对象也可以进行处理。（详情可以参见：jQuery.ajax文档） 此外，系统的可扩展性大大增强，可以附加各种数据处理器、过滤器和传输机制，为开发新的Ajax插件提供了方便。（详情参见：Ajax扩展文档） 2. 延迟对象 延迟对象（Deferred Object，jQuery.Deferred对象）是一个可链接的（chainable）实用工具对象，实现了Promise接口，可以在回调队列中注册多个回调、调用回调队列并转发任何同步/异步函数的成败状态。正如Using Deferreds in jQuery 1.5一文中说明的，其结果是在jQuery中能够将依赖于某个任务（事件）结果的逻辑与任务本身解耦了。这一点在JavaScript中其实并不新鲜，Mochikit和Dojo等已经实现有些日子了。由于jQuery 1.5的Ajax模块内置使用了延迟对象，因此现在通过jQuery编写Ajax程序将自动获得这一功能。 开发人员借此可以使用无法立即获得的返回值（如异步Ajax请求的返回结果），而且第一次能够附加多个事件处理器。 例如，使用了新的jQuery内部Ajax API就可以实现下面的代码了： // Assign handlers immediately after making the request, &#8230;<p class="read-more"><a href="http://www.uedspace.com/blog/310.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/310.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery鼠标滑过显示摘要介绍，默认显示第一个</title>
		<link>http://www.uedspace.com/blog/288.html</link>
		<comments>http://www.uedspace.com/blog/288.html#comments</comments>
		<pubDate>Tue, 09 Nov 2010 08:52:00 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=288</guid>
		<description><![CDATA[<a href="http://www.uedspace.com/blog/288.html" title="jquery鼠标滑过显示摘要介绍，默认显示第一个"></a>自己写的鼠标滑过显示摘要介绍，默认显示第一个，以下是主要代码： html结构 js 今天同事又给我了些思路，在原来的基础上优化了些，优化后的代码更少了，佩服jq的强大选择器！ js优化版]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/288.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过事件(click)定位元素在窗口居中显示</title>
		<link>http://www.uedspace.com/blog/285.html</link>
		<comments>http://www.uedspace.com/blog/285.html#comments</comments>
		<pubDate>Tue, 09 Nov 2010 08:38:32 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=285</guid>
		<description><![CDATA[最近在改公司网站终极页面的评论区域，需要点击“我要评论”在当前页直接跳转并且打开评论输入表单，和同事一起研究下，效果实现了，之后我又加了个功能：让打开的输入表单框在页面当前窗口垂直居中显示。<p class="read-more"><a href="http://www.uedspace.com/blog/285.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/285.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jquery选项卡效果</title>
		<link>http://www.uedspace.com/blog/271.html</link>
		<comments>http://www.uedspace.com/blog/271.html#comments</comments>
		<pubDate>Fri, 17 Sep 2010 09:11:51 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=271</guid>
		<description><![CDATA[前几天闲着写的一个效果，可以适用于同一页面多个表现形式的选项卡切换，下面是具体代码：<p class="read-more"><a href="http://www.uedspace.com/blog/271.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/271.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JQuery获取和设置Select选项方法(转)</title>
		<link>http://www.uedspace.com/blog/269.html</link>
		<comments>http://www.uedspace.com/blog/269.html#comments</comments>
		<pubDate>Fri, 17 Sep 2010 08:27:17 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=269</guid>
		<description><![CDATA[今天写了一个关于select的选中的效果 对jquery 操作select 的一些方法不熟悉，在网上搜了下，这篇写的挺详细，备份一下，感谢作者的贡献！<p class="read-more"><a href="http://www.uedspace.com/blog/269.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/269.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jquery实现简单的图片切换</title>
		<link>http://www.uedspace.com/blog/265.html</link>
		<comments>http://www.uedspace.com/blog/265.html#comments</comments>
		<pubDate>Wed, 08 Sep 2010 08:35:11 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=265</guid>
		<description><![CDATA[最近帮朋友写了一个广告的切换，用jquery写的，要求在一个页面放多个广告切换，为了方便调用，就直接把js封装到了一个函数内，然后函数带一个参数，传递不同的参数即可，代码很简洁，还是归功于jquery的强大啊！<p class="read-more"><a href="http://www.uedspace.com/blog/265.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/265.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery ajax学习总结</title>
		<link>http://www.uedspace.com/blog/260.html</link>
		<comments>http://www.uedspace.com/blog/260.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 17:20:26 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[xhtml+css]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=260</guid>
		<description><![CDATA[最近一段时间一直在学习jquery ajax 的应用，用了两周的时间把jquery基础教程上面的第六章看完，边看边练习感觉

还好，能够消化一部分，但还是有一些知识点理解的不够透彻，还需要继续努力啊，不过还是有必要先这里总结一下我

学会的东西，在这一章里主要讲了使用jquery基于请求加载数据（html、js、json、xml），下面来逐一进行分析。<p class="read-more"><a href="http://www.uedspace.com/blog/260.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/260.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery浮层效果第一版</title>
		<link>http://www.uedspace.com/blog/254.html</link>
		<comments>http://www.uedspace.com/blog/254.html#comments</comments>
		<pubDate>Wed, 18 Aug 2010 16:01:12 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=254</guid>
		<description><![CDATA[为了检验近几天学习jquery的成果，晚上写了一个简单的浮层效果，想要的效果基本已经实现，还需要进一步的完善....<p class="read-more"><a href="http://www.uedspace.com/blog/254.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/254.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>jquery图片渐隐渐显效果</title>
		<link>http://www.uedspace.com/blog/234.html</link>
		<comments>http://www.uedspace.com/blog/234.html#comments</comments>
		<pubDate>Wed, 07 Jul 2010 09:58:59 +0000</pubDate>
		<dc:creator>luo</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[幻灯片]]></category>

		<guid isPermaLink="false">http://www.uedspace.com/?p=234</guid>
		<description><![CDATA[自己写的query图片渐隐渐显效果，很实用，代码少，很简洁，如果你觉得合适可以拿去用<p class="read-more"><a href="http://www.uedspace.com/blog/234.html">继续阅读 &#187;</a></p>]]></description>
		<wfw:commentRss>http://www.uedspace.com/blog/234.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

