<?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>jQuery Tutorials &#38; Plugins &#187; JavaScript</title>
	<atom:link href="http://jqueryblog.net/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://jqueryblog.net</link>
	<description></description>
	<lastBuildDate>Mon, 05 Jul 2010 08:45:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery Optimization : Balance between JavaScript and jQuery</title>
		<link>http://jqueryblog.net/2009/11/jquery-optimization-balance-between-javascript-and-jquery/</link>
		<comments>http://jqueryblog.net/2009/11/jquery-optimization-balance-between-javascript-and-jquery/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 08:23:47 +0000</pubDate>
		<dc:creator>Osman Erdo&#287;an</dc:creator>
				<category><![CDATA[jQuery Optimization]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://jqueryblog.net/?p=20</guid>
		<description><![CDATA[jQuery is excellent to speed up ANY front-end developer job. However, there are times when jQuery may take more time to perform certain action than using JavaScript. For example,
css: function( key, value ) {
	// ignore negative width and height values
	if ( (key == 'width' &#124;&#124; key == 'height') &#38;&#38; parseFloat(value) &#60; 0 )
		value = undefined;
	return [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjqueryblog.net%2F2009%2F11%2Fjquery-optimization-balance-between-javascript-and-jquery%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjqueryblog.net%2F2009%2F11%2Fjquery-optimization-balance-between-javascript-and-jquery%2F" height="61" width="51" /></a></div><p>jQuery is excellent to speed up ANY front-end developer job. However, there are times when jQuery may take more time to perform certain action than using JavaScript. For example,</p>
<pre class="brush: jscript;">css: function( key, value ) {
	// ignore negative width and height values
	if ( (key == 'width' || key == 'height') &amp;&amp; parseFloat(value) &lt; 0 )
		value = undefined;
	return this.attr( key, value, &quot;curCSS&quot; );
}</pre>
<p>The above is a CSS method in jQuery that takes a key and a value which we are familiar using in this way</p>
<pre class="brush: jscript;">jQuery('#id').css('display', 'block');</pre>
<p>We can see that jQuery present certain overhead for doing something simple where JavaScript can also achieve.</p>
<pre class="brush: jscript;">document.getElementById('id').style.display = 'block';</pre>
<p>Other methods such as show(), hide(), hasClass() and etc. also present some overhead which you should balance between complexity and efficiency. Hence, we must understand some of the cost of jQuery action and balance between JavaScript and jQuery. jQuery is build for general public and making a general public framework might means additional operation to meet everyone needs. Hence, if you truly going all out on optimization, you should consider the trade-off of some action between JavaScript and jQuery.</p>
]]></content:encoded>
			<wfw:commentRss>http://jqueryblog.net/2009/11/jquery-optimization-balance-between-javascript-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

