<?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>I-Am-Bot &#187; jquery</title>
	<atom:link href="http://iambot.net/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://iambot.net</link>
	<description>Code, technology and life</description>
	<lastBuildDate>Sat, 28 Aug 2010 16:00:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>jQuery cannot cook</title>
		<link>http://iambot.net/2010/04/jquery-cannot-cook/</link>
		<comments>http://iambot.net/2010/04/jquery-cannot-cook/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 14:58:39 +0000</pubDate>
		<dc:creator>Srinath</dc:creator>
				<category><![CDATA[scribbles]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://iambot.net/?p=339</guid>
		<description><![CDATA[I love jQuery. It is more JavaScript that I can ever hope to understand. It's a boon to web developers wanting to make meaningful, cross browser, interactive web apps. That is why it pains me to see it being used for trivial stuff like accessing elements, showing/hiding elements, etc. Case in point: To access elements [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://jquery.com" target="_blank">jQuery</a>. It is more JavaScript that I can ever hope to understand. It's a boon to web developers wanting to make meaningful, cross browser, interactive web apps. That is why it pains me to see it being used for trivial stuff like accessing elements, showing/hiding elements, etc. Case in point:</p>
<p>To access elements using jQuery, you would use</p>
<blockquote><p>
$("p") - for tag name<br />
$(".first") - for class<br />
$("#menu") - for id
</p></blockquote>
<p>Can that be done without jQuery?</p>
<blockquote><p>
document.getElementsByTagName("p") - for tag name<br />
document.getElementsByClassName("first") - for class<br />
document.getElementById("menu") - for id
</p></blockquote>
<p>Of course the way you would manipulate the elements is different, but can be done easily as well. Appending some HTML content to an element with id "content"is a piece of cake with jQuery:</p>
<blockquote><p>$("#content").append("&lt;p&gt;This is the new content&lt;/p&gt;");</p></blockquote>
<p>And without it:</p>
<blockquote><p>document.getElementById("content").innerHTML += "&lt;p&gt;This is the new content&lt;/p&gt;";</p></blockquote>
<p>That does it. Now how about showing/hiding an element using jQuery</p>
<blockquote><p>
$("#content").show()<br />
$("#content").hide()
</p></blockquote>
<p>and without using it</p>
<blockquote><p>
document.getElementById("content").style.visibility = "visible";<br />
document.getElementById("content").style.visibility = "hidden";
</p></blockquote>
<p>You don't get the fancy animation effect like jQuery, but it does what its supposed to do. Now for the .each() function of jQuery that matches all the occurrences of an element. Lets say you want to set the text of all occurrences of the paragraph element to "Hi". Using jQuery you would do</p>
<blockquote><p>
$("p").each(function() {<br />
       $(this).html("Hi");<br />
}
</p></blockquote>
<p>Lets try that without jQuery</p>
<blockquote><p>
var para = document.getElementsByTagName("p");<br />
for(var i=0;i&lt;para.length;i++) {<br />
para[i].innerHTML = "Hi";<br />
}
</p></blockquote>
<p>There, you wrote an extra line, but it doesn't require a library and should work in almost all browsers.</p>
<p>Now one of the most important features of jQuery - the $(document).ready() function. What it basically does is it allows us to run our Javascript stuff as soon as the DOM is ready, and does not wait for the entire page to load (including images, and other resources which might be time consuming). This means that our scripts can execute a bit faster when compared to using the traditional window.onload method. More on that <a href="http://15daysofjquery.com/quicker/4/" target="_blank">here</a> and <a href="http://www.learningjquery.com/2006/09/introducing-document-ready" target="_blank">here</a>.</p>
<p>document.ready is something that is really neat and I used to have no arguments against it. But thankfully I came across <a href="http://code.google.com/p/domready/" target="_blank">domready</a>, which mimics the function and stands at around 1.7 KB compressed.</p>
<p>Of course jQuery is much much more than all the simple examples I've given. And that is exactly the point I'm trying to make. Using jQuery for straightforward, simple JavaScript manipulation doesn't make sense at all. It definitely isn't worth the extra 50 KB that it uses. However, if you want to do something that uses command chaining, AJAX, advanced selectors and matching, etc then you need to only look at jQuery. And yes, I do love jQuery.</p>
]]></content:encoded>
			<wfw:commentRss>http://iambot.net/2010/04/jquery-cannot-cook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple PHP calendar with inline edit</title>
		<link>http://iambot.net/2009/07/simple-php-calendar-with-inline-edit/</link>
		<comments>http://iambot.net/2009/07/simple-php-calendar-with-inline-edit/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 09:01:39 +0000</pubDate>
		<dc:creator>Srinath</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://iambot.net/?p=148</guid>
		<description><![CDATA[I was working on a project which required a simple calendar with inline edit. The calendar is for a school which marks if the day is working or not, and the comment (told ya, its very simple). Needs PHP, jQuery, jQuery jEditable plugin and a MySQL table to store the data. The demo is here. [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a project which required a simple calendar with inline edit. The calendar is for a school which marks if the day is working or not, and the comment (told ya, its very simple). Needs PHP, jQuery, jQuery jEditable plugin and a MySQL table to store the data.</p>
<p>The demo is <a href="http://iambot.net/demo/calendar/" target="_blank">here</a>. If anyone is interested in the code, drop a comment.</p>
<p>P.S: Yea I suck at CSS. If anyone does a better job, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://iambot.net/2009/07/simple-php-calendar-with-inline-edit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Announcing jGridTable</title>
		<link>http://iambot.net/2009/06/announcing-jgridtable/</link>
		<comments>http://iambot.net/2009/06/announcing-jgridtable/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 05:19:50 +0000</pubDate>
		<dc:creator>Srinath</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://iambot.net/?p=130</guid>
		<description><![CDATA[After my post about developing a new jQuery plugin, I've managed to shake off my apprehensions, and get it hosted on googlecode. The project is titled jGridTable, and hopefully isn't already taken. I will dedicate a page to it in this blog, where I can keep track of day to day developments, invite comments and [...]]]></description>
			<content:encoded><![CDATA[<p>After my <a href="http://iambot.net/developing-a-new-jquery-grid-plugin/">post</a> about developing a new jQuery plugin, I've managed to shake off my apprehensions, and get it hosted on googlecode. The project is titled <a href="http://code.google.com/p/jgridtable/" target="_blank">jGridTable</a>, and hopefully isn't already taken. I will dedicate a page to it in this blog, where I can keep track of day to day developments, invite comments and suggestions from people, and more importantly, ask for guidance. And if at all I get it to work, I intend to publish it with the liberal MIT license, so that others can keep improving it. My overall aim for the project is to make it as flexible as possible, without bloating up.</p>
<p>So here is to jGridTable. Lets see how far it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://iambot.net/2009/06/announcing-jgridtable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing a new jQuery Grid plugin</title>
		<link>http://iambot.net/2009/06/developing-a-new-jquery-grid-plugin/</link>
		<comments>http://iambot.net/2009/06/developing-a-new-jquery-grid-plugin/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 09:33:37 +0000</pubDate>
		<dc:creator>Srinath</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://iambot.net/?p=124</guid>
		<description><![CDATA[After weeks of searching for the perfect grid based data editor for my project, I've aspired to build one myself. Sure there are hundreds of existing plugins and more which are well established, and developed by well knowledgeable folks, I find a few shortcomings. Drawing inspiration from the existing plugins, here are my goals: Goals: [...]]]></description>
			<content:encoded><![CDATA[<p>After weeks of searching for the perfect grid based data editor for my project, I've aspired to build one myself. Sure there are <a href="http://www.trirand.com/blog/">hundreds</a> <a href="http://flexigrid.info">of</a> <a href="http://www.datatables.net">existing</a> <a href="http://reconstrukt.com/ingrid/">plugins</a> <a href="http://dreakmore.info/tgrid/">and</a> <a href="http://ajaxcrud.com">more</a> which are well established, and developed by well knowledgeable folks, I find a few shortcomings. Drawing inspiration from the existing plugins, here are my goals:</p>
<p><strong>Goals</strong>:</p>
<ul>
<li>Uses jQuery library</li>
<li>Small and light. Size should be less than 30 KB for minified version</li>
<li>Dynamic data source for easy table population (JSON or plain HTML)</li>
<li>Create, Read, Update and Delete (CRUD) operation</li>
<li>Sorting based on columns (using tablesorter plugin)</li>
<li>Searching based on filters for multiple columns</li>
<li>Follows KISS Principal - Keep it simple stupid. No unnecessary insertion of DOM elements</li>
<li>Insertion of checkbox for each row and defining custom button to perform an action</li>
</ul>
<p>What seems like a huge list of features add to my very basic problem : I'm still a noob at jQuery and javascript. So, as a personal goal this project is a way for me to learn jQuery right from scratch, and to put it to good use.</p>
<p><strong>Methodology:</strong></p>
<ul>
<li>Study the existing plugins to understand how they work</li>
<li>Use code snippets that are already available. Reduces work, and will be much better than reinventing the wheel the wrong way</li>
<li>Less attention to appearance (CSS) till the code really works, partly because I'm still learning CSS, and would be tough to combine both jQuery and css code when I'm new to both.</li>
</ul>
<p>As you'd have guessed, its an ambitious project for someone who is new to javascript/jQuery. Nevertheless, I hope I can pull it off with guidance from knowledgeable people who know their jQuery. I plan to host it on either github or google code and put up a dedicated page on this blog to keep track of the development. As the first step, I'll start with defining the various functions that are required, thus creating a skeleton jQuery plugin, which simply displays a one line output when called in order (yea, I'm pathetic).</p>
<p>So anyone who reads this, please leave your thoughts, advice, comments here. Thank You.</p>
]]></content:encoded>
			<wfw:commentRss>http://iambot.net/2009/06/developing-a-new-jquery-grid-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
