<?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>Victor Farazdagi &#187; WP-plugins</title>
	<atom:link href="http://www.phpmag.ru/category/programming/php5/wp-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmag.ru</link>
	<description>Phrozn, Phing &#38; Zend Framework Musings</description>
	<lastBuildDate>Fri, 19 Aug 2011 08:47:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress plugin dev + jQuery</title>
		<link>http://www.phpmag.ru/2009/06/21/wordpress-plugin-dev-jquery/</link>
		<comments>http://www.phpmag.ru/2009/06/21/wordpress-plugin-dev-jquery/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 03:35:50 +0000</pubDate>
		<dc:creator>Victor Farazdagi</dc:creator>
				<category><![CDATA[UMapper DevTimes]]></category>
		<category><![CDATA[WP-plugins]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[notes]]></category>

		<guid isPermaLink="false">http://www.phpmag.ru/?p=628</guid>
		<description><![CDATA[Today, when working on UMapper plugin, I tried to use jQuery &#8211; and failed. Although jQuery is now in WP core, $ shortcut wasn&#8217;t working. As it turned out, WP team (quite rightly!) used JQuery.noConflict &#8211; which helps avoiding naming conflict with similar libraries, such as prototype. So, we cannot use $ shortcut function, which [...]]]></description>
			<content:encoded><![CDATA[<p>Today, when working on <a href="http://wordpress.org/extend/plugins/umapper/">UMapper plugin</a>, I tried to use jQuery &#8211; and failed. Although jQuery is now in WP core, <em><strong>$</strong></em> shortcut wasn&#8217;t working. As it turned out, WP team (quite rightly!) used <a title="More information about this function" href="http://docs.jquery.com/Core/jQuery.noConflict">JQuery.noConflict</a> &#8211; which helps avoiding naming conflict with similar libraries, such as prototype. So, we cannot use $ shortcut function, which is quite annoying. In order to overcome this limitation the following construct can be used:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<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>
    <span style="color: #006600; font-style: italic;">// inside this block you can use $ shortcut !!</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Just a small note to myself <img src='http://www.phpmag.ru/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpmag.ru/2009/06/21/wordpress-plugin-dev-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

