<?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>PHPLAMP网站建设 &#187; clearTimeout</title>
	<atom:link href="http://www.phplamp.org/tag/cleartimeout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phplamp.org</link>
	<description>PHPLAMP提供保定网站建设，网站推广优化服务。</description>
	<lastBuildDate>Tue, 31 Aug 2010 09:56:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>贴近用户体验 js延时后再滑出操作项</title>
		<link>http://www.phplamp.org/2009/03/js-settimeout/</link>
		<comments>http://www.phplamp.org/2009/03/js-settimeout/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 00:12:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[网站优化]]></category>
		<category><![CDATA[clearTimeout]]></category>
		<category><![CDATA[setTimeout]]></category>

		<guid isPermaLink="false">http://www.phplamp.org/?p=283</guid>
		<description><![CDATA[很多时候我们会进行这样的设计，鼠标经过一个对象时，会滑出另一个对象。这样效果非好，也为网站增加了不少新意。但是不合理的代码会大大的影响浏览者阅读。
假如鼠标经过此对象马上就滑出另一对象，当用户用意间经过此对象，比如他要去点操作项时，这样却滑出了个东西，很另人费解。
解决办法也相对简单一些，就是加一个延时。
JavaScript代码
&#60;script type=&#8221;text/javascript&#8221;&#62;
var bigTimeout = false;
function iOver() { // 鼠标经过时
bigTimeout = setTimeout(function() {
// 您要进行的操作
}, 500); // 延时500
}
function iOut() { // 无意经过时
clearTimeout(bigTimeout)
}
&#60;/script&#62;
]]></description>
			<content:encoded><![CDATA[<p>很多时候我们会进行这样的设计，鼠标经过一个对象时，会滑出另一个对象。这样效果非好，也为网站增加了不少新意。但是不合理的代码会大大的影响浏览者阅读。</p>
<p>假如鼠标经过此对象马上就滑出另一对象，当用户用意间经过此对象，比如他要去点操作项时，这样却滑出了个东西，很另人费解。</p>
<p>解决办法也相对简单一些，就是加一个延时。</p>
<h3>JavaScript代码</h3>
<blockquote><p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var bigTimeout = false;</p>
<p>function iOver() { // 鼠标经过时<br />
bigTimeout = setTimeout(function() {<br />
// 您要进行的操作<br />
}, 500); // 延时500<br />
}</p>
<p>function iOut() { // 无意经过时<br />
clearTimeout(bigTimeout)<br />
}<br />
&lt;/script&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.phplamp.org/2009/03/js-settimeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
