<?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>harry.blog &#187; javascript</title>
	<atom:link href="http://blog.harrspy.com/tag/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.harrspy.com</link>
	<description>留住往昔的美丽，去开创未来的光明。</description>
	<lastBuildDate>Wed, 01 Sep 2010 14:30:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Simple Reply for Habari</title>
		<link>http://blog.harrspy.com/simple-reply-for-habari</link>
		<comments>http://blog.harrspy.com/simple-reply-for-habari#comments</comments>
		<pubDate>Mon, 27 Oct 2008 13:58:13 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[habari]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[reply]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[之前写过一个wp插件 SimpleReply ，本来想移植到Habari，不过想来也太麻烦，所以试着直接用js实现。 首先要在模板里引入jQuery，没办法，不会js只能用框架偷懒 xd&#8230; 然后引入下面这段js function addCommentReply&#40;&#41; &#123; $&#40;'.comment'&#41;.map&#40;function&#40;&#41;&#123; var cid = this.id; var author = $&#40;'.fn &#62; a', $&#40;this&#41;&#41;.text&#40;&#41;; &#160; var repbtn = $&#40;&#34;&#60;a class='reply-btn' title='回复&#34;+author+&#34;'&#62;回复&#60;/a&#62;&#34;&#41;; $&#40;'.comment-meta', $&#40;this&#41;&#41;.append&#40;'&#124;', repbtn&#41;; &#160; repbtn.click&#40;function&#40;&#41;&#123; var ta = $&#40;'#content'&#41;; ta.val&#40;ta.val&#40;&#41; + &#34;&#60;a href='#&#34;+cid+&#34;'&#62;@&#34;+author+&#34;&#60;/a&#62; &#34;&#41;; ta.focus&#40;&#41;; &#125;&#41;; &#125;&#41;; &#125; &#160; $&#40;document&#41;.ready&#40;function&#40;&#41;&#123; addCommentReply&#40;&#41;; &#125;&#41;; 完了，直接插入a标记也省的后台用php转换了，如果你的模板结构和我的不同，改下选择器就行了&#8230;&#8230;&#8230;&#8230;]]></description>
			<content:encoded><![CDATA[<p>之前写过一个wp插件 <a href='http://harryxu.cn/blog/wp-plugin-simplereply'>SimpleReply</a> ，本来想移植到Habari，不过想来也太麻烦，所以试着直接用js实现。</p>
<p>首先要在模板里引入<a href='http://jquery.com' target='_blank'>jQuery</a>，没办法，不会js只能用框架偷懒 xd&#8230;</p>
<p>然后引入下面这段js</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> addCommentReply<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.comment'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">map</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> cid <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">id</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> author <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.fn &gt; a'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> repbtn <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;a class='reply-btn' title='回复&quot;</span><span style="color: #339933;">+</span>author<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;回复&lt;/a&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.comment-meta'</span><span style="color: #339933;">,</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> repbtn<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        repbtn.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> ta <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            ta.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span>ta.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;a href='#&quot;</span><span style="color: #339933;">+</span>cid<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;@&quot;</span><span style="color: #339933;">+</span>author<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt; &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            ta.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    addCommentReply<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>完了，直接插入a标记也省的后台用php转换了，如果你的模板结构和我的不同，改下选择器就行了&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/simple-reply-for-habari/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>一个很实用的插件 &#8211; WordPress Plugin Code Editor</title>
		<link>http://blog.harrspy.com/%e4%b8%80%e4%b8%aa%e8%b6%85%e8%b5%9e%e7%9a%84wp%e6%8f%92%e4%bb%b6-wordpress-plugin-code-editor</link>
		<comments>http://blog.harrspy.com/%e4%b8%80%e4%b8%aa%e8%b6%85%e8%b5%9e%e7%9a%84wp%e6%8f%92%e4%bb%b6-wordpress-plugin-code-editor#comments</comments>
		<pubDate>Thu, 09 Aug 2007 15:01:54 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/?p=133</guid>
		<description><![CDATA[WordPress Plugin Code Editor是一个基于CodePress（一个JS写的在线实时代码高亮编辑器）开发的wp插件，安装后可以使后台编辑wp模板的文本框实现代码高亮而且是编辑的时候即时高亮的，很cool啊，这样在线编辑wp模板的代码就方便好多啊，哈哈。]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.naden.de/blog/wordpress-code-editor" target="_blank">WordPress Plugin Code Editor</a>是一个基于<a href="http://codepress.org/" target="_blank">CodePress</a>（一个JS写的在线实时代码高亮编辑器）开发的wp插件，安装后可以使后台编辑wp模板的文本框实现代码高亮而且是编辑的时候即时高亮的，很cool啊，这样在线编辑wp模板的代码就方便好多啊，哈哈。<br />
<img src="http://photo6.yupoo.com/20070809/231235_1501775855_hpripovh.jpg"/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/%e4%b8%80%e4%b8%aa%e8%b6%85%e8%b5%9e%e7%9a%84wp%e6%8f%92%e4%bb%b6-wordpress-plugin-code-editor/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>《JS高级程序设计》到手了</title>
		<link>http://blog.harrspy.com/js%e9%ab%98%e7%ba%a7%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e5%88%b0%e6%89%8b%e4%ba%86</link>
		<comments>http://blog.harrspy.com/js%e9%ab%98%e7%ba%a7%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e5%88%b0%e6%89%8b%e4%ba%86#comments</comments>
		<pubDate>Wed, 10 Jan 2007 15:27:37 +0000</pubDate>
		<dc:creator>harry</dc:creator>
				<category><![CDATA[harry]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://harryxu.cn/blog/?p=97</guid>
		<description><![CDATA[在当当买的，我晕 最近买了好多书 php的、JS的还有昨天收到了ego送的《Flash网站建设技术精粹》，技术却不见长进，偶都没时间看，疯了 :[redface]: ，等过年放假我就猫在家里看书了 :[rolleyes]:]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://product.dangdang.com/product.aspx?product_id=9211839" target="_blank">当当</a>买的，我晕 最近买了好多书 php的、JS的还有昨天收到了ego送的《Flash网站建设技术精粹》，技术却不见长进，偶都没时间看，疯了 :[redface]: ，等过年放假我就猫在家里看书了 :[rolleyes]:<br />
<a href="http://images.dangdang.com/images/9211839.jpg" class="thickbox"><img src="http://images.dangdang.com/images/9211839_b.jpg" alt="JavaScript 高级程序设计" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.harrspy.com/js%e9%ab%98%e7%ba%a7%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e5%88%b0%e6%89%8b%e4%ba%86/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
