<?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>Binary Doodles &#187; jQuery</title>
	<atom:link href="http://nithinbekal.com/category/javascript/jquery-javascript-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://nithinbekal.com</link>
	<description>Ruby on Rails, Web 2.0, Wordpress and more...</description>
	<lastBuildDate>Fri, 30 Jul 2010 17:49:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to create a simple datepicker using jQuery</title>
		<link>http://nithinbekal.com/2009/08/09/how-to-create-a-simple-datepicker-using-jquery/</link>
		<comments>http://nithinbekal.com/2009/08/09/how-to-create-a-simple-datepicker-using-jquery/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 14:33:00 +0000</pubDate>
		<dc:creator>Nithin Bekal</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Datepicker]]></category>

		<guid isPermaLink="false">http://nithinbekal.com/2009/08/09/how-to-create-a-simple-datepicker-using-jquery/</guid>
		<description><![CDATA[jQuery allows you to easily create a datepicker and customize it according to your requirements. Here&#8217;s a quick look at how you can get started with using the jQuery datepicker.
The jQuery website has a nice application called Themeroller that lets you customize the interface for jQuery UI widgets. There are also plenty of themes available [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery allows you to easily create a datepicker and customize it according to your requirements. Here&#8217;s a quick look at how you can get started with using the jQuery datepicker.</p>
<p>The jQuery website has a nice application called <a href="http://jqueryui.com/themeroller/">Themeroller</a> that lets you customize the interface for jQuery UI widgets. There are also plenty of themes available in the gallery that you can download and use directly. Copy the stylesheet, images, the jQuery file and the jQuery-UI files into the appropriate directories and link them in the header of your HTML file.</p>
<p>Now let&#8217;s create a simple form that contains the text field that you want to convert into a datepicker.</p>
<pre>&lt;form action="index" method="get"&gt;
  &lt;input id="date-pick" name="date-pick" type="text" value="" /&gt;
  &lt;input id="date-submit" name="date-submit" type="submit" value="Go!" /&gt;
&lt;/form&gt;</pre>
<p>To convert the input field with the id <code>date-pick</code> into a datepicker, write the following jQuery code in the head section of your HTML.</p>
<pre>$(function(){
  $("#date-pick").datepicker();
});</pre>
<div class="separator" style="float: right; width: 250px;"><a style="margin-left: 1em; margin-right: 1em;" href="http://2.bp.blogspot.com/_SPbUIiu4sfA/Sn7XP4QC2SI/AAAAAAAACAg/Q9rZReomeAE/s1600-h/datepicker.png"><img src="http://2.bp.blogspot.com/_SPbUIiu4sfA/Sn7XP4QC2SI/AAAAAAAACAg/Q9rZReomeAE/s320/datepicker.png" border="0" alt="" /></a></div>
<p>That&#8217;s it! The input field that you created now works as a popup datepicker. A calendar showing the current month appears whenever you focus on the <code>#date-pick</code> field and the date you click on appears as text in the field.</p>
<p>There are tons of options to customize the datepicker, such as changing the date format sent to the server or using a different language for the calendar. You can explore these options in the <a href="http://docs.jquery.com/UI/Datepicker">jQuery UI documentation for the datepicker</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nithinbekal.com/2009/08/09/how-to-create-a-simple-datepicker-using-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery: Avoiding conflict with other libraries using jQuery.noconflict()</title>
		<link>http://nithinbekal.com/2009/08/01/jquery-avoiding-conflict-with-other-libraries-using-jquery-noconflict/</link>
		<comments>http://nithinbekal.com/2009/08/01/jquery-avoiding-conflict-with-other-libraries-using-jquery-noconflict/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 18:47:00 +0000</pubDate>
		<dc:creator>Nithin Bekal</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://nithinbekal.com/2009/08/01/jquery-avoiding-conflict-with-other-libraries-using-jquery-noconflict/</guid>
		<description><![CDATA[Recently, when using jQuery in my Ruby on Rails project, the jQuery calendar plugin I was using suddenly refused to work in one of the views. The plugin was working fine everywhere else, but it just wouldn&#8217;t work here.
The problem was that there was a conflict with a rails prototype helper (observe_field) that I was [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, when using jQuery in my Ruby on Rails project, the jQuery calendar plugin I was using suddenly refused to work in one of the views. The plugin was working fine everywhere else, but it just wouldn&#8217;t work here.</p>
<p>The problem was that there was a conflict with a rails prototype helper <code>(observe_field)</code> that I was using in the view. Using jQuery along with other javascript frameworks such as prototype or mootools causes a namespace clash as they all use the <code>$</code> alias.</p>
<p>jQuery provides a <code>noconflict</code> method to avoid this clash, which lets you rename the jQuery function (<code>$</code>) as something else.</p>
<p>In the code below, the <code>noconflict</code> method is called to replace the $ alias with the function name <code>jQuery</code> and release <code>$</code> to other frameworks.</p>
<pre>
&lt;script src="jquery.js"&gt;&amp;lt/script&gt;
&lt;script&gt;
  jQuery.noConflict();
  jQuery(document).ready(function(){
    // your code goes here.
  });
&lt;/script&gt;
</pre>
<p>However, you can also use some other name instead of jquery by assigning <code>jQuery.noconflict()</code> to another variable. In the code below, I have use <code>$jq</code> as the new alias for the jQuery function. Now you must use this new alias where you would otherwise have used the $ shorthand.</p>
<pre>
&lt;script src="jquery.js"&gt;&amp;lt/script&gt;&lt;script&gt;
  var $jq = jQuery.noConflict();
  $jq(document).ready(function(){
    // your code goes here.
  });&lt;/script&gt;
</pre>
<p>Using this form of the <code>noconflict</code> method allows you to avoid namespace conflicts while at the same time giving you the ability to use a short alias (<code>$jq</code> above) for jQuery.</p>
<p>If you want to globally disable the <code>$</code> alias for jQuery, call the <code>noconflict</code> method from the last line of the jQuery file.</p>
<p>Make sure you call this function before using the conflicting library, otherwise it may still clash. However, you may include the other library without causing any conflict.</p>
]]></content:encoded>
			<wfw:commentRss>http://nithinbekal.com/2009/08/01/jquery-avoiding-conflict-with-other-libraries-using-jquery-noconflict/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
