<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>《jQuery中queue和dequeue的用法》的评论</title>
	<atom:link href="http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/feed" rel="self" type="application/rss+xml" />
	<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html</link>
	<description>关注HTML,CSS,JavaScript,jQuery等前端开发</description>
	<lastBuildDate>Tue, 07 Feb 2012 05:15:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>作者：maml</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4655</link>
		<dc:creator>maml</dc:creator>
		<pubDate>Mon, 17 Oct 2011 01:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4655</guid>
		<description>这个好像是 jquery的bug，我使用1.3.2版本也是有这个问题，当名字叫做fx的时候的 第一个函数不能执行，叫做其他名字的时候是可以的。我把jquery升级到了1.6.2，这个问题就解决了</description>
		<content:encoded><![CDATA[<p>这个好像是 jquery的bug，我使用1.3.2版本也是有这个问题，当名字叫做fx的时候的 第一个函数不能执行，叫做其他名字的时候是可以的。我把jquery升级到了1.6.2，这个问题就解决了</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Shawphy</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4600</link>
		<dc:creator>Shawphy</dc:creator>
		<pubDate>Sat, 10 Sep 2011 09:31:37 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4600</guid>
		<description>注意啊，queue和dequeue是对一个jQuery对象来执行的，我是放在document上的。比如
$(document).queue()...
$(document).dequeue()...

而直接的$.queue()和$.dequeue()的用法你可以看一下文档，并不一样的。但同样能实现功能。</description>
		<content:encoded><![CDATA[<p>注意啊，queue和dequeue是对一个jQuery对象来执行的，我是放在document上的。比如<br />
$(document).queue()&#8230;<br />
$(document).dequeue()&#8230;</p>
<p>而直接的$.queue()和$.dequeue()的用法你可以看一下文档，并不一样的。但同样能实现功能。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：leshang</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4598</link>
		<dc:creator>leshang</dc:creator>
		<pubDate>Thu, 08 Sep 2011 13:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4598</guid>
		<description>function fun1(){};
function fun2(){};
$.queue(&quot;fx&quot;,fun1());
$.queue(&quot;fx&quot;,fun2());
$.dequeue(&quot;fx&quot;); 
是这样写吗?  怎么不行啊</description>
		<content:encoded><![CDATA[<p>function fun1(){};<br />
function fun2(){};<br />
$.queue(“fx”,fun1());<br />
$.queue(“fx”,fun2());<br />
$.dequeue(“fx”);<br />
是这样写吗?  怎么不行啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：jQuery中queue和dequeue的用法 &#124; 等待-放飞梦想</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4597</link>
		<dc:creator>jQuery中queue和dequeue的用法 &#124; 等待-放飞梦想</dc:creator>
		<pubDate>Thu, 08 Sep 2011 07:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4597</guid>
		<description>[...] 摘自：http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html [...]</description>
		<content:encoded><![CDATA[<p>[...] 摘自：http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Shawphy</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4584</link>
		<dc:creator>Shawphy</dc:creator>
		<pubDate>Sat, 27 Aug 2011 16:11:36 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4584</guid>
		<description>几种定义方式的差别，可以参考这篇文章 http://blog.csdn.net/mallva/article/details/1947223

创建回调函数哪种方式都可以。</description>
		<content:encoded><![CDATA[<p>几种定义方式的差别，可以参考这篇文章 <a href="http://blog.csdn.net/mallva/article/details/1947223" rel="nofollow">http://blog.csdn.net/mallva/article/details/1947223</a></p>
<p>创建回调函数哪种方式都可以。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：沫沫</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4583</link>
		<dc:creator>沫沫</dc:creator>
		<pubDate>Sat, 27 Aug 2011 12:38:29 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4583</guid>
		<description>你好,我学javascript和jquery有一小段时间了,我想请教两个问题:
1. function aa(){} 和var aa=function(){}有什么区别,各在什么场合用
2.创建回调函数的时候,只能用var aa=function(){}方法吗?
谢谢,如果方便,可以发到我邮箱.</description>
		<content:encoded><![CDATA[<p>你好,我学javascript和jquery有一小段时间了,我想请教两个问题:<br />
1. function aa(){} 和var aa=function(){}有什么区别,各在什么场合用<br />
2.创建回调函数的时候,只能用var aa=function(){}方法吗?<br />
谢谢,如果方便,可以发到我邮箱.</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Shawphy</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4421</link>
		<dc:creator>Shawphy</dc:creator>
		<pubDate>Sat, 27 Nov 2010 03:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4421</guid>
		<description>对了，如果你仅仅需要延时的话，可以使用jQuery.delay()方法，可以起到相同的作用。</description>
		<content:encoded><![CDATA[<p>对了，如果你仅仅需要延时的话，可以使用jQuery.delay()方法，可以起到相同的作用。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：赵旭东</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4420</link>
		<dc:creator>赵旭东</dc:creator>
		<pubDate>Fri, 26 Nov 2010 01:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4420</guid>
		<description>谢谢！，去掉setInterval，解决了。顺便去掉了循环就得用setinterval的傻想法。</description>
		<content:encoded><![CDATA[<p>谢谢！，去掉setInterval，解决了。顺便去掉了循环就得用setinterval的傻想法。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Shawphy</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4419</link>
		<dc:creator>Shawphy</dc:creator>
		<pubDate>Thu, 25 Nov 2010 14:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4419</guid>
		<description>博客评论中一来没有代码格式，二来只有JS，比较难以判断问题的所在。建议简化出一个DEMO，包含简化但完整的HTML/CSS/JS，发布到 http://pastehtml.com/ 上面，然后贴出链接，便于解决问题。我初步判断下来，与那个3秒一次的setInterval有关。

如果我没理解错的话，你可能把最后的
$(document).queue(&quot;mq&quot;,fq);
af();
这两行，不小心放在了setInterval里边了。把这两行搬出来试试吧。</description>
		<content:encoded><![CDATA[<p>博客评论中一来没有代码格式，二来只有JS，比较难以判断问题的所在。建议简化出一个DEMO，包含简化但完整的HTML/CSS/JS，发布到 <a href="http://pastehtml.com/" rel="nofollow">http://pastehtml.com/</a> 上面，然后贴出链接，便于解决问题。我初步判断下来，与那个3秒一次的setInterval有关。</p>
<p>如果我没理解错的话，你可能把最后的<br />
$(document).queue(“mq”,fq);<br />
af();<br />
这两行，不小心放在了setInterval里边了。把这两行搬出来试试吧。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：赵旭东</title>
		<link>http://shawphy.com/2009/04/how-to-use-queue-and-dequeue.html/comment-page-1#comment-4417</link>
		<dc:creator>赵旭东</dc:creator>
		<pubDate>Thu, 25 Nov 2010 07:32:12 +0000</pubDate>
		<guid isPermaLink="false">http://shawphy.com/?p=156#comment-4417</guid>
		<description>我试着用您这个方法自己建个队列，很好用。
但是想请教怎么加入个延迟动作进去，例如，什么也不做，延迟3秒
我试了几个方案都有问题。
&lt;code&gt;
var current=0;
var fq=[  
        function(){sc.eq(current).show(600,af);},
        function(){setTimeout(af,600);},
        function(){sc.eq(current).children(&quot;span&quot;).show(600,af)},
        function(){setTimeout(af,3000);},
        function(){
                        sc.eq(current).children(&quot;span&quot;).hide(300,af);
                },
        function(){
                        sc.eq(current).hide(300,af);
                },
        function(){
                       eq();
                       current++;
                  }
];
var af=function(){
        $(document).dequeue(&quot;mq&quot;);
};
var eq=function(){
        $(document).queue(&quot;mq&quot;,[]);
}
var sliderSet=window.setInterval(function(){
                if(current&gt;=6) {current=0;}
                if (current&lt;=-1) {current=5;}
                $(document).queue(&quot;mq&quot;,fq);
                af();
       },3000);
})
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>我试着用您这个方法自己建个队列，很好用。<br />
但是想请教怎么加入个延迟动作进去，例如，什么也不做，延迟3秒<br />
我试了几个方案都有问题。<br />
<code><br />
var current=0;<br />
var fq=[<br />
        function(){sc.eq(current).show(600,af);},<br />
        function(){setTimeout(af,600);},<br />
        function(){sc.eq(current).children("span").show(600,af)},<br />
        function(){setTimeout(af,3000);},<br />
        function(){<br />
                        sc.eq(current).children("span").hide(300,af);<br />
                },<br />
        function(){<br />
                        sc.eq(current).hide(300,af);<br />
                },<br />
        function(){<br />
                       eq();<br />
                       current++;<br />
                  }<br />
];<br />
var af=function(){<br />
        $(document).dequeue("mq");<br />
};<br />
var eq=function(){<br />
        $(document).queue("mq",[]);<br />
}<br />
var sliderSet=window.setInterval(function(){<br />
                if(current&gt;=6) {current=0;}<br />
                if (current&lt;=-1) {current=5;}<br />
                $(document).queue(&quot;mq&quot;,fq);<br />
                af();<br />
       },3000);<br />
})<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

