<?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; 侧边栏</title>
	<atom:link href="http://leotheme.cn/tag/%e4%be%a7%e8%be%b9%e6%a0%8f/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Mon, 21 May 2012 09:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>利用WP自带的JS库打造超酷的侧边栏</title>
		<link>http://leotheme.cn/wordpress/wordpressjs-jqueryone.html</link>
		<comments>http://leotheme.cn/wordpress/wordpressjs-jqueryone.html#comments</comments>
		<pubDate>Fri, 29 Aug 2008 02:34:03 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[前端交互]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[侧边栏]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=50</guid>
		<description><![CDATA[从这篇文章开始，我们来认识下wordpress自带的JS库，下面这张图是WP自动的JS文件夹。可以看出有很多JS文件，当然包括大名鼎鼎的jquery和prototype。利用这些我们能实现很多很酷的效果。 我们先通过jquery库来实现简单的效果。先做个什么效果呢？就做一个我Maxthon主题中的侧边栏收缩效果好了。[关于JQ这个库大家可以自己找些资料去了解下] 就这样一个效果，这个效果很酷，但代码更酷，我们用一句代码就行了。先看代码！~ $(&#34;#t_1&#34;).click(function(){$(&#34;#c_1&#34;).animate({height:&#34;toggle&#34;,opacity: &#34;toggle&#34; });$(&#34;.t1&#34;).toggleClass(&#34;off&#34;);}); 这段代码可以写成一行的，在这里这样写是为了方便大家理解。这就是jq的链式编程。 现在来解释下，其实有点JS基础的应该都能看懂。当点击ID为t_1的时候、ID为c_1的容器执行一个效果”animate” animate是JQ里的自定义效果。在这里它的参数是{height:”toggle”,opacity: “toggle” },高度是”toggle”.toggle在这里的意思是：“如果是true则false,如果是false则true”。更多的资料大家可以下载JQ的chm手册。opacity是一个透明的滤镜效果。然后我们用”$(“.t1&#8243;).toggleClass(“off”);”给点击的元素动态的加个样式，用来改变那个箭头的样式。怎么样，这一句代码就实现了侧边栏的收缩同时带有透明的效果。 今天就说到这里了，怎么样，心动了？赶紧去实现下！&#8230; jQueryapi_chm 相关文章2008-09-15 -- jquery基础教程二[伸缩、隔行变色...] (3)在上一篇介绍中已经讲了一些基本的应用，今天继续。先看一下面这个例子 Demo_5：收缩展开功能[如无法运行请多刷新几次或保存到本地运行] 可伸缩块 p,d...2008-09-11 -- jquery基础教程一[click,addClass,show,hide] (3)原创内容—转载请说明出处. jQuery我想很多人都知道，但用WP的好像很少有人说到这个。今天开始和大家一起来研究下如何用jQuery来为我们的WP添加实用的功能。至于jQuery的相关背景和资...2009-11-30 -- 不刷新（AJAX）获取文章的内容 (53)相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...2009-06-11 -- jQuery 实现 tab 切换一例 (11)对于Tab切换，我想大家都不陌生了。现在几乎是到处可见了；今天为大家介绍下怎么用jQuery来实现一个简单的Tab切换效果。其实这类例子网上也有很多了，在这里不讨论它的实现原理，因为都是些最基本的应用...2009-05-27 -- jQuery性能优化指南 (6)现在jquery应用的越来越多, 有些同学在享受爽快淋漓coding时就将性能问题忽略了, 比如我. jquery虽在诸多的js类库中性能表现还算优秀, 但毕竟不是在用原生的javascript开...<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一个实用的wordpress导航</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">解决wordpress分页问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>从这篇文章开始，我们来认识下wordpress自带的JS库，下面这张图是WP自动的JS文件夹。可以看出有很多JS文件，当然包括大名鼎鼎的jquery和prototype。利用这些我们能实现很多很酷的效果。</p>
<p><a href="http://"><img class="alignnone size-medium wp-image-51" title="JS文件夹" src="http://leotheme.cn/wp-content/uploads/2008/08/e69caae6a087e9a298-1.gif" alt="" width="447" height="206" /></a></p>
<p>我们先通过jquery库来实现简单的效果。先做个什么效果呢？就做一个我Maxthon主题中的侧边栏收缩效果好了。[关于JQ这个库大家可以自己找些资料去了解下]<br />
<span id="more-50"></span></p>
<p>就这样一个效果，这个效果很酷，但代码更酷，我们用一句代码就行了。先看代码！~</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">$</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">#t_1</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">click</span><span style="color: Olive;">(</span><span style="color: Green;">function</span><span style="color: Olive;">(){</span><span style="color: Gray;"><br />$</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">#c_1</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">animate</span><span style="color: Olive;">({</span><span style="color: Blue;">height</span><span style="color: Gray;">:</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">toggle</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: Blue;">opacity</span><span style="color: Gray;">: </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">toggle</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: Olive;">})</span><span style="color: Gray;">;<br />$</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">.t1</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">toggleClass</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">off</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br /></span><span style="color: Olive;">})</span><span style="color: Gray;">;</span></div></div>
<p>这段代码可以写成一行的，在这里这样写是为了方便大家理解。这就是jq的链式编程。<br />
现在来解释下，其实有点JS基础的应该都能看懂。当点击ID为t_1的时候、ID为c_1的容器执行一个效果”animate”<br />
animate是JQ里的自定义效果。在这里它的参数是{height:”toggle”,opacity: “toggle” },高度是”toggle”.toggle在这里的意思是：“如果是true则false,如果是false则true”。更多的资料大家可以下载JQ的chm手册。opacity是一个透明的滤镜效果。然后我们用”$(“.t1&#8243;).toggleClass(“off”);”给点击的元素动态的加个样式，用来改变那个箭头的样式。怎么样，这一句代码就实现了侧边栏的收缩同时带有透明的效果。<br />
今天就说到这里了，怎么样，心动了？赶紧去实现下！&#8230;</p>
<p><a class="download" href="http://leotheme.cn/wp-content/uploads/2008/08/jqueryapi_chm.rar">jQueryapi_chm</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一个实用的wordpress导航</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">解决wordpress分页问题</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2008-09-15 -- <a href="http://leotheme.cn/javascript/jqueryforwpgoodtwo.html" title="jquery基础教程二[伸缩、隔行变色...]">jquery基础教程二[伸缩、隔行变色...]</a> (3)<br /><small>在上一篇介绍中已经讲了一些基本的应用，今天继续。先看一下面这个例子
Demo_5：收缩展开功能[如无法运行请多刷新几次或保存到本地运行]

 
 
 
 
可伸缩块 

 
p,d...</small></li><li>2008-09-11 -- <a href="http://leotheme.cn/javascript/jqueryforwpgoodone.html" title="jquery基础教程一[click,addClass,show,hide]">jquery基础教程一[click,addClass,show,hide]</a> (3)<br /><small>原创内容—转载请说明出处.

jQuery我想很多人都知道，但用WP的好像很少有人说到这个。今天开始和大家一起来研究下如何用jQuery来为我们的WP添加实用的功能。至于jQuery的相关背景和资...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-06-11 -- <a href="http://leotheme.cn/javascript/jquery-tab.html" title="jQuery 实现 tab 切换一例">jQuery 实现 tab 切换一例</a> (11)<br /><small>对于Tab切换，我想大家都不陌生了。现在几乎是到处可见了；今天为大家介绍下怎么用jQuery来实现一个简单的Tab切换效果。其实这类例子网上也有很多了，在这里不讨论它的实现原理，因为都是些最基本的应用...</small></li><li>2009-05-27 -- <a href="http://leotheme.cn/javascript/jquery-xingnen-youhua.html" title="jQuery性能优化指南">jQuery性能优化指南</a> (6)<br /><small>现在jquery应用的越来越多, 有些同学在享受爽快淋漓coding时就将性能问题忽略了,  比如我.  jquery虽在诸多的js类库中性能表现还算优秀, 但毕竟不是在用原生的javascript开...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpressjs-jqueryone.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

