<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7148860988886047724</id><updated>2012-02-26T13:05:44.364+05:30</updated><category term='jQuery For Beginners'/><category term='jQuery UI DatePicker'/><category term='jQuery 1.7'/><category term='Text Editor Plugins'/><category term='jQuery Selectors'/><category term='jQuery With Ajax'/><category term='DropDown'/><category term='jQuery docs'/><category term='jQuery UI'/><category term='jQuery Tutorials'/><category term='jQuery CDN'/><category term='jQuery Mobile Examples'/><category term='ASP.NET'/><category term='jQuery Codes'/><category term='jQuery Array'/><category term='Android Devices'/><category term='jQuery Slider'/><category term='Selectors'/><category term='jQuery Mobile Demo'/><category term='jQuery 1.6'/><category term='jQuery Plugins'/><category term='jQuery Text Editor'/><category term='jQuery With ASP.NET'/><category term='jQuery Validation'/><category term='Sencha Touch'/><category term='jQuery innerText'/><category term='jQuery Methods'/><category term='jQuery Ajax'/><category term='Downloads'/><category term='Jquery Code Snippets'/><category term='jQuery Books'/><category term='jQuery YouTube'/><category term='Android'/><category term='setTimeOut'/><category term='Cheat Sheets'/><category term='jQuery Interview Question'/><category term='jQuery Tips'/><category term='jQuery Properties'/><category term='Ebooks'/><category term='jQuery'/><category term='jQuery DatePicker'/><category term='CSS Selectors'/><category term='CSS'/><category term='GridView'/><category term='jQuery Mobile'/><category term='jQuery Cheat Sheets'/><category term='jQuery documentation'/><category term='jQuery Code Examples'/><category term='jQTouch'/><category term='Date Picker'/><category term='jQuery Effects'/><category term='jQuery Tools'/><category term='Methods'/><category term='Validation'/><category term='HTML'/><category term='ASP.NET Grid View'/><category term='JavaScript'/><category term='jQuery Events'/><category term='Text Editor'/><category term='jQuery Functions'/><title type='text'>jQuery By Example</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default?start-index=101&amp;max-results=100'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>221</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7215654672329844832</id><published>2012-02-22T09:00:00.000+05:30</published><updated>2012-02-26T12:37:06.853+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Array'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Remove Item from Array using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
Today during my work, I came across a situation where I need to &lt;b&gt;remove items from Array using jQuery&lt;/b&gt;. I did it using &lt;b&gt;jQuery &lt;/b&gt;and thought of sharing with my you as well. Below code will remove the item from the array by its value (not by index).  &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    var arr = ["jQuery","JavaScript","HTML","Ajax","Css"];
    var itemtoRemove = "HTML";
    arr.splice($.inArray(itemtoRemove, arr),1);
});​
&lt;/pre&gt;The above code is using JavaScript &lt;b&gt;splice()&lt;/b&gt; method and &lt;b&gt;jQuery.inArray()&lt;/b&gt; to find out index of the element. The &lt;b&gt;splice()&lt;/b&gt; method adds and/or removes elements to/from an array, and returns the removed element(s) where &lt;b&gt;jQuery.inArray()&lt;/b&gt; Search for a specified value within an array and return its index (or -1 if not found).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;See result below.&lt;/b&gt;  &lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/5Upec/embedded/result,js,html" style="height: 170px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
And if you want to remove the items from Array by index only then you don't have to use jQuery.inArray to find the index. You can directly use splice() method and pass the index of the element.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    var arr = ["jQuery","JavaScript","HTML","Ajax","Css"];
    var itemtoRemove = "HTML";
    arr.splice(1,1);
});​
&lt;/pre&gt;The second argument in splice() denotes number of items to be removed. If set to 0, no elements will be removed. If you use &lt;b&gt;&lt;i&gt;arr.splice(1,2)&lt;/i&gt;&lt;/b&gt; then it will remove 2 items from the array which are at index 1.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;See result below.&lt;/b&gt;  &lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/SmLzq/embedded/result,js,html" style="height: 140px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
You can also use splice() method to add items in array. Read more about splice() method &lt;a href="http://www.w3schools.com/jsref/jsref_splice.asp" target="_blank"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7215654672329844832?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7215654672329844832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/remove-item-from-array-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7215654672329844832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7215654672329844832'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/remove-item-from-array-using-jquery.html' title='Remove Item from Array using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6605305671801074459</id><published>2012-02-21T11:00:00.000+05:30</published><updated>2012-02-21T11:40:25.738+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android Devices'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Detect Android Devices using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
Android and iPhone/iPad development is pretty hot and very much in demand. Below small piece of code will be useful to detect android devices using jQuery.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
  var isAndroid = navigator.userAgent.toLowerCase().indexOf("android");
  if(isAndroid &amp;gt; -1)
  {
      //It is an Android device. Redirect to Android Version.
  }      
});​
&lt;/pre&gt;You can test this code by changing the user agent in your browser and set it to Android. There are many plugins/ extension available that allows to change User agent. Below is the link for various user agent switchers available with chrome and firefox. &lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="https://chrome.google.com/webstore/search/user%20agent%20switcher?_ac=1" target="_blank"&gt;&lt;b&gt;For Chrome&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/search/?q=user+agent&amp;amp;appver=10.0.2&amp;amp;platform=windows" target="_blank"&gt;&lt;b&gt;For FireFox&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Also read:&lt;/b&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.in/2012/02/detect-apple-devices-ipad-iphone-ipod.html" target="_blank"&gt;&lt;span style="color: #660000;"&gt;Detect Apple Devices (iPad, iPhone, iPod) using jQuery &lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6605305671801074459?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6605305671801074459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/detect-android-devices-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6605305671801074459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6605305671801074459'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/detect-android-devices-using-jquery.html' title='Detect Android Devices using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1407719954892752396</id><published>2012-02-21T09:35:00.000+05:30</published><updated>2012-02-21T11:40:48.573+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Detect Apple Devices (iPad, iPhone, iPod) using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
iPhone/iPad development is pretty hot and very much in demand. Below small piece of code will be useful to detect apple devices like iPhone, iPad and iPod using jQuery.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){

  var isiPhone = navigator.userAgent.toLowerCase().indexOf("iphone");
  var isiPad = navigator.userAgent.toLowerCase().indexOf("ipad");
  var isiPod = navigator.userAgent.toLowerCase().indexOf("ipod");

  if(isiPhone &amp;gt; -1)
  {
      //Redirect to iPhone Version of the website.
  }
  if(isiPad &amp;gt; -1)
  {
      //Redirect to iPad Version of the website.
  }
  if(isiPod &amp;gt; -1)
  {
      //Redirect to iPod Version of the website.
  }    
});​
&lt;/pre&gt;&lt;br /&gt;
You can test this code by changing the user agent in your browser and set it to iPhone, iPad or iPod. There are many plugins/ extension available that allows to change User agent. Below is the link for various user agent switchers available with chrome and firefox. &lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="https://chrome.google.com/webstore/search/user%20agent%20switcher?_ac=1" target="_blank"&gt;&lt;b&gt;For Chrome&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/search/?q=user+agent&amp;amp;appver=10.0.2&amp;amp;platform=windows" target="_blank"&gt;&lt;b&gt;For FireFox&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
If you just want to detect whether the device used is one of out of these 3 then you can create a function which will return true, if the devices is one of them otherwise false.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;function isAppleDevice(){
    return (
        (navigator.userAgent.toLowerCase().indexOf("ipad") &gt; -1) ||
        (navigator.userAgent.toLowerCase().indexOf("iphone") &gt; -1) ||
        (navigator.userAgent.toLowerCase().indexOf("ipod") &gt; -1)
    );
}
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Also read:&lt;/b&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.in/2012/02/detect-android-devices-using-jquery.html" target="_blank"&gt;&lt;span style="color: #660000;"&gt;Detect Android Devices using jQuery&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1407719954892752396?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1407719954892752396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/detect-apple-devices-ipad-iphone-ipod.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1407719954892752396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1407719954892752396'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/detect-apple-devices-ipad-iphone-ipod.html' title='Detect Apple Devices (iPad, iPhone, iPod) using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5550470068377943594</id><published>2012-02-20T09:30:00.000+05:30</published><updated>2012-02-20T09:30:00.349+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to write IE Version specific jQuery code</title><content type='html'>Well, making code &lt;b&gt;browser&lt;/b&gt; compatible is always a challenge and presence of various browsers makes life difficult for developers. In this post, you will find the way to code for &lt;b&gt;IE&lt;/b&gt; specific version. jQuery provides &lt;b&gt;.browser&lt;/b&gt; property which returns the browser information. Below jQuery code checks for IE version 7 only.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function(){
  if(jQuery.browser.msie &amp;&amp; jQuery.browser.version.substring(0, 1) == 7)
  {
      //Your Code Goes Here...
  }
});​
&lt;/pre&gt;The above code first checks if the browser is IE or not using "&lt;b&gt;&lt;i&gt;jQuery.browser.msie&lt;/i&gt;&lt;/b&gt;". This will return true for IE and false for other browsers. And after that it checks for the version of the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;See result below. (Please check in IE only)&lt;/b&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;iframe style="width: 100%; height: 100px" src="http://jsfiddle.net/jquerybyexample/wa827/1/embedded/result,js" allowfullscreen="allowfullscreen" frameborder="1"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
You can also check for IE 8 or 9. All you need to change is the value in the if condition. Currently it is checking only for IE 7. So for IE 8,&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function(){
  if(jQuery.browser.msie &amp;&amp; jQuery.browser.version.substring(0, 1) == 8)
  {
      //Your Code Goes Here...
  }
});​
&lt;/pre&gt;If you want to run the code for IE 7 or higher version of IE, then just change the condition a little bit. See below.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function(){
  if(jQuery.browser.msie &amp;&amp; jQuery.browser.version.substring(0, 1) &gt;= 7)
  {
      //Your Code Goes Here...
  }
});​
&lt;/pre&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5550470068377943594?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5550470068377943594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/how-to-write-ie-version-specific-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5550470068377943594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5550470068377943594'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/how-to-write-ie-version-specific-jquery.html' title='How to write IE Version specific jQuery code'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8893786858328345288</id><published>2012-02-15T10:00:00.000+05:30</published><updated>2012-02-15T10:09:07.602+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='DropDown'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Common Dropdown operation (Get, Set, Add, Remove) using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;b&gt;DropDown&lt;/b&gt; list is a very basic and common control and You might be using either &lt;b&gt;ASP.NET Dropdown&lt;/b&gt; list or normal html &lt;b&gt;dropdown &lt;/b&gt;list in your project. In this post, I have put together the code examples for all kind of &lt;b&gt;dropdown&lt;/b&gt; operation. For example, to &lt;b&gt;get selected value from dropdown&lt;/b&gt;, for &lt;b&gt;to set value in dropdown&lt;/b&gt;, for to &lt;b&gt;add items to dropdown&lt;/b&gt;, for to &lt;b&gt;remove items from dropdown&lt;/b&gt; and to &lt;b&gt;enable/disable&lt;/b&gt; items in &lt;b&gt;dropdown&lt;/b&gt; using jQuery. These little code snippets related to all kind of dropdown operation are quite useful.&lt;br /&gt;
&lt;br /&gt;
I have summarized the code snippets under different sections which are given below.&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="#get"&gt;Get value and text from dropdown list&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;
&lt;b&gt;
&lt;li&gt;&lt;a href="#set"&gt;Set value and selected index in dropdown list&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#add"&gt;Add Items to dropdown list&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#remove"&gt;Remove Items from dropdown list&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#enable"&gt;Enable/Disable items in dropdown list&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#change"&gt;Selection Change Event&lt;/a&gt;&lt;/li&gt;
&lt;/b&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;&lt;u&gt;&lt;a href="#" name="get"&gt;Get value and text from dropdown list&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get selected option value&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList').val()
&lt;/pre&gt;&lt;b&gt;Get selected option text&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:selected').text()
&lt;/pre&gt;&lt;b&gt;Get dropdown list text&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList').text()
&lt;/pre&gt;&lt;b&gt;Get selected index&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList").get(0).selectedIndex;
&lt;/pre&gt;&lt;b&gt;Select first element&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList option:first-child").attr("selected","selected");
&lt;/pre&gt;&lt;span style="color: purple;"&gt;&lt;b&gt;DEMO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/7MZLk/embedded/result,js,html" style="height: 200px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style="color: #990000; font-size: large;"&gt;&lt;a href="#" name="set"&gt;Set value and selected index&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set selected index&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList").get(0).selectedIndex = 3;
&lt;/pre&gt;&lt;b&gt;Set element by Value&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList").val(5);
&lt;/pre&gt;&lt;b&gt;Set element by Text&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:contains("HTML")').attr("selected","selected");
&lt;/pre&gt;&lt;span style="color: purple;"&gt;&lt;b&gt;DEMO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/5rjCh/embedded/result,js,html" style="height: 150px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #990000; font-size: large;"&gt;&lt;u&gt;&lt;a href="#" name="add"&gt;Add Items to dropdown list&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Add item to list in the begining&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList").prepend("&lt;option selected="selected" value="0"&gt; Select &lt;/option&gt;");
&lt;/pre&gt;&lt;b&gt;Add item to list in the end&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("&lt;option value="6"&gt;Java Script&lt;/option&gt;").appendTo("#ddlList");
&lt;/pre&gt;&lt;span style="color: purple;"&gt;&lt;b&gt;DEMO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/VtJz4/embedded/result,js,html" style="height: 150px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style="color: #990000; font-size: large;"&gt;&lt;a href="#" name="remove"&gt;Remove Items from dropdown list&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Remove selected item&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:selected').remove();
&lt;/pre&gt;&lt;b&gt;Remove Item by Value&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option[value="4"]').remove();
//This removes items with value 4.
&lt;/pre&gt;&lt;b&gt;Remove Item by Text&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:contains("HTML")').remove();
//This removes items with Text HTML.
&lt;/pre&gt;&lt;b&gt;Remove all items excluding first item&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:not(:first)').remove();
&lt;/pre&gt;&lt;b&gt;Remove all items excluding last item&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:not(:last)').remove();
&lt;/pre&gt;&lt;b&gt;Clear/Empty drop down&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList").empty();
//OR
$("#ddlList &amp;gt; option").remove();
&lt;/pre&gt;&lt;span style="color: purple;"&gt;&lt;b&gt;DEMO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/b2xtQ/embedded/result,js,html" style="height: 320px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;&lt;u&gt;&lt;a href="#" name="enable"&gt;Enable/Disable items in dropdown list&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Disable item by value in dropdown list&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList option[value='3']").attr("disabled","disabled");
//This disables item with value 3.
&lt;/pre&gt;&lt;b&gt;Disable item by text in dropdown list&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:contains("HTML")').attr("disabled","disabled");
//This disables item with text "HTML".
&lt;/pre&gt;&lt;b&gt;Enable item by value in dropdown list&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList option[value='3']").removeAttr("disabled");
//This enables item with value 3.
&lt;/pre&gt;&lt;b&gt;Enable item by text in dropdown list&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#ddlList option:contains("HTML")').removeAttr("disabled");
//This enables item with text "HTML".
&lt;/pre&gt;&lt;span style="color: purple;"&gt;&lt;b&gt;DEMO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/cmNrs/embedded/result,js,html" style="height: 200px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;&lt;u&gt;&lt;a href="#" name="change"&gt;Selection Change Event&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#ddlList ").change(function()
{
   /* do something here */
});
&lt;/pre&gt;&lt;span style="color: purple;"&gt;&lt;b&gt;DEMO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/ZUujX/embedded/result,js,html" style="height: 100px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Hope you have find it useful.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8893786858328345288?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8893786858328345288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/common-dropdown-operation-get-set-add.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8893786858328345288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8893786858328345288'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/common-dropdown-operation-get-set-add.html' title='Common Dropdown operation (Get, Set, Add, Remove) using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8381831872441449283</id><published>2012-02-14T09:30:00.000+05:30</published><updated>2012-02-14T09:30:02.430+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Get Radio Button value using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here’s small piece of code to get the value of a checked or selected radio button out of a group of radio buttons.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var selValue = $('input[name=rbnNumber]:checked').val(); 
&lt;/pre&gt;In above code, rbnNumber is name of the radio group.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #990000; font-size: large;"&gt;Demo&lt;/span&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;HTML Code:&lt;/b&gt;&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/6Sx6n/embedded/html,result" style="height: 170px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;jQuery Code:&lt;/b&gt;&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/6Sx6n/embedded/js,result" style="height: 150px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Result:&lt;/b&gt;&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/6Sx6n/embedded/result" style="height: 180px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See Complete &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/6Sx6n/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;You can also get the value of individual radio button using it's ID as selector.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var selValue = $('#rbnNumber:checked').val(); 
&lt;/pre&gt;If you want to get ID of selected radio button out of group of radio button, then below code will work.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var selValue = $('input[name=rbnNumber]:checked').attr('id'); 
&lt;/pre&gt;&lt;b&gt;See Result, jQuery and HTML code below:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/2Sswn/embedded/js,result,html" style="height: 180px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8381831872441449283?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8381831872441449283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/get-radio-button-value-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8381831872441449283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8381831872441449283'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/get-radio-button-value-using-jquery.html' title='Get Radio Button value using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-9216073907603241039</id><published>2012-02-13T10:30:00.000+05:30</published><updated>2012-02-13T10:30:00.072+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Text Editor'/><category scheme='http://www.blogger.com/atom/ns#' term='Text Editor'/><category scheme='http://www.blogger.com/atom/ns#' term='Text Editor Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Useful jQuery Text Editor Plugins</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;b&gt;Text editors&lt;/b&gt; allow users to edit and enter text within a web browser. Rich-text editors are essentially web-based WYSIWYG ("what you see is what you get") editors. In this post, I have put together a collection of some of the best, useful and free &lt;b&gt;jQuery Text Editor plugins&lt;/b&gt; which are very user friendly and can be easily integrated with minor modifications. These plugins are developed using jQuery.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: purple; font-size: x-large;"&gt;&lt;a href="http://markitup.jaysalvat.com/home/" rel="nofollow"&gt;markitup&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://markitup.jaysalvat.com/home/"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://markitup.jaysalvat.com/downloads/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;Download&lt;/b&gt; &lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
markItUp! is not meant to be a “Full-Features-Out-of-the-Box”-editor. Instead it is a very lightweight, customizable and flexible engine made to meet the developer’s needs in their CMSes, blogs, forums or websites. markItUp! is not a WYSIWYG editor, and it never will be. &lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Fast and unobtrusive integration&lt;/li&gt;
&lt;li&gt;Support for keyboard shortcuts&lt;/li&gt;
&lt;li&gt;Ajax dynamic preview&lt;/li&gt;
&lt;li&gt;Supported: IE7, Safari 3.1, Firefox 2, Firefox 3. IE6 and Opera 9+ as-is.&lt;/li&gt;
&lt;li&gt;Licence: MIT/GPL&lt;/li&gt;
&lt;li&gt;File: Packed naked engine is about 6.5Kb.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="border: 1px solid grey; clear: both; text-align: center;"&gt;&lt;a href="http://markitup.jaysalvat.com/home/" imageanchor="1"&gt;&lt;img border="0" height="160" src="http://2.bp.blogspot.com/-LMyrT4uTiBM/TzYfFr-6vzI/AAAAAAAABsY/F5W4gH8tPVM/s640/jQuery+TextEditor+(MarkItUp).gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;hr style="border: 1px solid grey;" /&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href="http://www.wymeditor.org/"&gt;&lt;span style="color: purple; font-size: x-large;"&gt;WYMEditor&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://www.wymeditor.org/demo/"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://www.wymeditor.org/download/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;Download&lt;/b&gt;&lt;/span&gt; &lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
WYMeditor is a web-based WYSIWYM (What You See Is What You Mean) XHTML editor (not WYSIWYG). WYMeditor's main concept is to leave details of the document's visual layout, and to concentrate on its structure and meaning, while trying to give the user as much comfort as possible (at least as WYSIWYG editors).&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;XHTML strict + CSS compliant&lt;/li&gt;
&lt;li&gt;No font or text formatting, sizes or colors - WYMeditor is CSS-based&lt;/li&gt;
&lt;li&gt;Designed to be easy to integrate into your application&lt;/li&gt;
&lt;li&gt;No installation needed - this is 100% Javascript code - no plugin, no extension&lt;/li&gt;
&lt;li&gt;Will remain as simple as possible&lt;/li&gt;
&lt;li&gt;We focus on well-tested code, stability and usability before adding new features&lt;/li&gt;
&lt;li&gt;Image, link, table support&lt;/li&gt;
&lt;li&gt;Skins support via CSS&lt;/li&gt;
&lt;li&gt;Internationalization&lt;/li&gt;
&lt;li&gt;APIs, plugins support&lt;/li&gt;
&lt;li&gt;Free and Open Source, fully adaptable to your needs.&lt;/li&gt;
&lt;li&gt;Most of the browsers are supported.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="border: 1px solid grey; clear: both; text-align: center;"&gt;&lt;a href="http://www.wymeditor.org/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="160" src="http://1.bp.blogspot.com/-_sDRiBoZN-I/TzYtCkbD4lI/AAAAAAAABtA/z0uTZUabwoI/s640/jQuery+TextEditor+(WYMEditor).gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;hr style="border: 1px solid grey;" /&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href="http://www.upian.com/upiansource/ueditor/en"&gt;&lt;span style="color: purple; font-size: x-large;"&gt;uEditor&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://www.upian.com/upiansource/ueditor/demo/"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://www.upian.com/upiansource/ueditor/files/uEditor.zip"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;Download&lt;/span&gt;&lt;/b&gt;&lt;/a&gt; )&lt;br /&gt;
&lt;br /&gt;
uEditor is flexible and easy to use. As for widgEditor, the generated code is clean and valid (though you should verify it after form submission) and it's possible to use a custom sylesheet for rendering in WYSIWYG mode among other things.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="border: 1px solid grey; clear: both; text-align: center;"&gt;&lt;a href="http://www.upian.com/upiansource/ueditor/en" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-OSZ87tb9DMU/TzYg7sHyhJI/AAAAAAAABs4/YekJolWLprY/s1600/jQuery+TextEditor+(uEditor).png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;hr style="border: 1px solid grey;" /&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href="http://remiya.com/htmlbox/"&gt;&lt;span style="color: purple; font-size: x-large;"&gt;HTMLBox&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://remiya.com/htmlbox/index.php/3/demo.html"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;b&gt;&lt;a href="http://remiya.com/htmlbox/index.php/2/download.html"&gt;&lt;span style="color: #990000;"&gt;Download&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; )&lt;br /&gt;
&lt;br /&gt;
JQuery HtmlBox is a modern, cross­browser, interactive, open­source wysiwyg editor built on top of the excellent JQuery library. It is tested with the most widely deployed browsers ­ Mozilla Firefox, SeaMonkey, Microsoft Internet Explorer, Opera, Apple Safari and Google Chrome. The variety of features, and the advanced configuration capabilities, combined with the easy and intuitive setup make HtmlBox as the preferred choice, when interactive user input is required such as in content management systems, forums, guest books, contact forms and others.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Easy Integration.&lt;/li&gt;
&lt;li&gt;Multiple Browser Support.&lt;/li&gt;
&lt;li&gt;Small Size.&lt;/li&gt;
&lt;li&gt;XHTML Output Possible.&lt;/li&gt;
&lt;li&gt;Ajax Support Out of the Box&lt;/li&gt;
&lt;li&gt;Complete User Manual&lt;/li&gt;
&lt;li&gt;Skinnable Interface&lt;/li&gt;
&lt;li&gt;Custom Icon Sets&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="border: 1px solid grey; clear: both; text-align: center;"&gt;&lt;a href="http://remiya.com/htmlbox/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="160" src="http://3.bp.blogspot.com/-zILbowMVhac/TzYg4v_CKhI/AAAAAAAABsg/nGG6xD9Vpq8/s640/jQuery+TextEditor+%2528HTMLBox%2529.gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;hr style="border: 1px solid grey;" /&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href="http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html"&gt;&lt;span style="color: purple; font-size: x-large;"&gt;Lightweight RTE- jQuery&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://code.google.com/p/rte-light/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;Download&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; )&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Super lightweight 7kb uncompressed&lt;/li&gt;
&lt;li&gt;Compatible with major browsers&lt;/li&gt;
&lt;li&gt;Degrade gracefully&lt;/li&gt;
&lt;li&gt;GNU General Public License&lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="border: 1px solid grey; clear: both; text-align: center;"&gt;&lt;a href="http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-Z71GQhcHgSk/TzYg5U1EYJI/AAAAAAAABso/uL19Aw-hQDI/s1600/jQuery+TextEditor+%2528LightWeight%2529.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-9216073907603241039?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/9216073907603241039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/useful-jquery-text-editor-plugins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9216073907603241039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9216073907603241039'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/useful-jquery-text-editor-plugins.html' title='Useful jQuery Text Editor Plugins'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-LMyrT4uTiBM/TzYfFr-6vzI/AAAAAAAABsY/F5W4gH8tPVM/s72-c/jQuery+TextEditor+(MarkItUp).gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2660237809778748238</id><published>2012-02-13T09:30:00.000+05:30</published><updated>2012-02-13T09:30:03.326+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>Get checkbox status using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
Below single line of code will provide the status of checkbox using jQuery. It checks whether the checked is checked or not using jQuery and will return 1 or 0.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var isChecked = $('#chkSelect').attr('checked')?true:false;
&lt;/pre&gt;I have noticed that on many website it is written that 'checked' attribute will return true or false, but this is not correct. If the checked box is checked then it return status as "checked", otherwise "undefined".&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Check Yourself.&lt;/b&gt;  &lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/xe7aL/embedded/result,js/" style="height: 150px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
So if you want to have true or false, then you need to use conditional expression as I have done in the code.&lt;br /&gt;
&lt;br /&gt;
Below are some other ways of checking the status of checkbox.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var isChecked = $('#chkSelect:checked').val()?true:false;
&lt;/pre&gt;$('#chkSelect:checked').val() method returns "on" when checkbox is checked and "undefined", when checkbox is unchecked.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var isChecked = $('#chkSelect').is(':checked');
&lt;/pre&gt;The above method uses "is" selector and it returns true and false based on checkbox status.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Check Yourself.&lt;/b&gt;  &lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/KNQbH/embedded/result,js,html/" style="height: 150px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2660237809778748238?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2660237809778748238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/get-checkbox-status-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2660237809778748238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2660237809778748238'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/get-checkbox-status-using-jquery.html' title='Get checkbox status using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3386390334303689775</id><published>2012-02-10T09:30:00.000+05:30</published><updated>2012-02-10T09:30:00.062+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Prevent Default behavior using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
If you want to &lt;b&gt;prevent default behavior&lt;/b&gt; of any element using &lt;b&gt;jQuery&lt;/b&gt; then below little piece of code will help you. For example, the default behavior of the button is click but if you want to prevent it for any reason, then you can use jQuery provide "&lt;b&gt;preventDefault&lt;/b&gt;" method.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
  $("#btnSubmit").click(function(e){
     e.preventDefault();
  });
});
&lt;/pre&gt;
Above code will not perform a postback on click of button. ASP.NET developers are familiar with Postback term but still if you are not familiar with Postback term then [&lt;i&gt;A postback is an HTTP POST to the same page that the form is on. In other words, the contents of the form are POSTed back to the same URL as the form.&lt;/i&gt;]&lt;br /&gt;
&lt;br /&gt;
When JavaScript was on top, then the developers used to write "return false;" to prevent postback. For example, while submitting the form, you are validating the inputs and if inputs are not valid then you don't want to post the data back to server. So in such scenario, "return false;" is used. Well, you can still use "return false;" with jQuery but a better approach is to use "event.preventDefault()".&lt;br /&gt;
&lt;br /&gt;
But then you might be wondering what is the difference between "return false;" and e.preventDefault(). right? Here is your answer.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The "return false;" statement not only disables the default action but it also stops event bubbling, where e.preventDefault() doesn't stop event bubbling. &lt;/b&gt;Read below post for detailed answer and a cool demo.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://css-tricks.com/return-false-and-prevent-default/" rel="nofollow" target="_blank"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;The difference between ‘return false;’ and ‘e.preventDefault();’&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3386390334303689775?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3386390334303689775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/prevent-default-behavior-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3386390334303689775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3386390334303689775'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/prevent-default-behavior-using-jquery.html' title='Prevent Default behavior using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4889302751497136374</id><published>2012-02-09T13:03:00.000+05:30</published><updated>2012-02-09T14:15:28.396+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to check element visible or hidden using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
Below is a simple piece of &lt;b&gt;jQuery&lt;/b&gt; code which checks the &lt;b&gt;visibility&lt;/b&gt; of element using &lt;b&gt;jQuery&lt;/b&gt;. jQuery provides "&lt;b&gt;visible&lt;/b&gt;" selector which can be used to check the &lt;b&gt;visibility&lt;/b&gt;.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var isVisible = $('#dvData').is(':visible');
alert("dvData is " + isVisible);
&lt;/pre&gt;If you want to check if element is hidden, then you can use &lt;b&gt;":hidden"&lt;/b&gt; selector. &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var isHidden  = $('#dvData').is(':hidden');
alert("dvData is " + isHidden);
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/bMUby/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;There is a myth that &lt;b&gt;":visible"&lt;/b&gt; and &lt;b&gt;":hidden"&lt;/b&gt; selector checks for "&lt;a href="http://www.w3schools.com/cssref/pr_class_display.asp" rel="nofollow" target="_blank"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;display&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;" css property which is used to show/hide the element. But this is not correct. &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;div id="dvData" style="display:none;"&amp;gt;
//Your content goes here...
&amp;lt;/div&amp;gt;
&lt;/pre&gt;Before jQuery 1.3.1 (and older) an element was visible if its CSS "display" was not "none", its CSS "visibility" was not "hidden", and its type (if it was an input) was not "hidden" But After jQuery 1.3.1 versions an element is visible if its browser-reported offsetWidth or offsetHeight is greater than 0.&lt;br /&gt;
&lt;br /&gt;
However, if you have used "&lt;a href="http://www.w3schools.com/cssref/pr_class_visibility.asp" rel="nofollow" target="_blank"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;visibility&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;" css property to hide the element then ":visible" and ":hidden" selector will not work. Elements with &lt;i&gt;visibility: hidden&lt;/i&gt; or &lt;i&gt;opacity: 0&lt;/i&gt; are considered to be visible, since they still consume space in the layout.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/y58m5/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;So if you have seen the above demo then it must be clear to you that ":visible" and ":hidden" selector will not work with css property "visibility". So what's the solution?&lt;br /&gt;
&lt;br /&gt;
If you have used "visibility" css property to hide the element then use ":hidden" jQuery selector to check the visibility.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;div id="dvData" style="visibility:hidden;"&amp;gt;
//Your content goes here...
&amp;lt;/div&amp;gt;
&lt;/pre&gt;then use below code to find out where element is visible or not.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;if ($('#dvData').css("visibility") == "hidden")
{
   // Item is hidden. Write your code.
}
else
{
   // Item is Visible. Write your code.
}
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/FpfRE/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Read "&lt;a href="http://webdesign.about.com/od/css/f/blfaqhidden.htm" rel="nofollow" target="_blank"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;What's the difference between display: none and visibility: hidden?&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;"&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4889302751497136374?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4889302751497136374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/how-to-check-element-visible-or-hidden.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4889302751497136374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4889302751497136374'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/how-to-check-element-visible-or-hidden.html' title='How to check element visible or hidden using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6796408839843640998</id><published>2012-02-09T10:00:00.000+05:30</published><updated>2012-02-09T10:00:00.057+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='setTimeOut'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to use jQuery setTimeout function</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
If you want to delay your &lt;b&gt;jQuery&lt;/b&gt; code to run after some amount of time, you can use JavaScript &lt;b&gt;setTimeout&lt;/b&gt; function to delay the execution. &lt;b&gt;setTimeout&lt;/b&gt; is used in JavaScript to delay execution of some code and the same function can be use with &lt;b&gt;jQuery&lt;/b&gt; without any extra effort. &lt;br /&gt;
&lt;br /&gt;
The Basic syntax for setTimeout function is, &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;setTimeout(function() {
      // Do something after 2 seconds
}, 2000);
&lt;/pre&gt;The &lt;b&gt;setTimeout&lt;/b&gt; function takes the times in miliseconds. And the block can contain either your &lt;b&gt;jQuery&lt;/b&gt; code, or you can also make a call to any function.&lt;br /&gt;
&lt;br /&gt;
For example, if I want to make div element fade out then you can use below code. It will fade out the div with id "dvData" after 2 seconds.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){ 
    setTimeout(function(){ 
        $('#dvData').fadeOut();}, 2000); 
});
&lt;/pre&gt;The above code will fade out the div after 2 seconds automatically when page is loaded.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/wggua/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;You can also call this on button click as well. All you need to do is to put the above code on click of button.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() { 
    $("#btnFade").bind("click",function() {
      setTimeout(function() { 
        $('#dvData').fadeOut();}, 2000); 
  });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/CrLNU/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;You can also use below alternative that is create a function and call it on click of button.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() { 
    $('#btnFade').bind('click', function() {
      FadeOut();
  }); 
  function FadeOut()
  {
     setTimeout(function() { 
        $('#dvData').fadeOut();}, 2000); 
  } 
});
&lt;/pre&gt;As I mentioned earlier that with &lt;b&gt;setTimeout()&lt;/b&gt;, you can also make a call to another function. Till now, we were writing a piece of code and that is ideal if your code is one line but when lines of code is more then it is better to create a separate function and call it in setTimeout().&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() { 
    $('#btnFade').bind('click', function() {
      FadeOut();
  });
    
  function FadeOut()
  {
     setTimeout(FadeDiv(), 2000); 
  }
    
  function FadeDiv()
  {
    $('#dvData').fadeOut();
  } 
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Y7aWc/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6796408839843640998?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6796408839843640998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/how-to-use-jquery-settimeout-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6796408839843640998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6796408839843640998'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/how-to-use-jquery-settimeout-function.html' title='How to use jQuery setTimeout function'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8555485299029536946</id><published>2012-02-07T10:05:00.000+05:30</published><updated>2012-02-07T11:13:50.165+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Extract numbers from string using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I got into a situation where I need to extract the numbers from the string variable on client side using jQuery. If a string has 1 or more occurrence of the numbers then also need to extract it and store it into an array. For example, if the string is  &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var str = '3jquery33By333Example3333';&lt;/pre&gt;&lt;b&gt;And required output is:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/4DbmT/embedded/result" style="height: 150px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
So all I need was a regular expression which matches all the numbers in the string and return the array. Below is the jQuery code which I have used.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/4DbmT/embedded/js,result" style="height: 220px; width: 100%;"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See Complete &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/4DbmT/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8555485299029536946?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8555485299029536946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/extract-numbers-from-string-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8555485299029536946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8555485299029536946'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/extract-numbers-from-string-using.html' title='Extract numbers from string using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6204809977202616064</id><published>2012-02-06T10:00:00.000+05:30</published><updated>2012-02-06T14:06:37.334+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sencha Touch'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='jQTouch'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQTouch Vs Sencha Touch vs jQuery Mobile</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
In my previous &lt;a href="http://jquerybyexample.blogspot.in/2012/02/jqtouch-vs-jquery-mobile.html" rel="nofollow"&gt;&lt;b&gt;post&lt;/b&gt;&lt;/a&gt;, I have put together the difference between &lt;b&gt;jQTouch &lt;/b&gt;and &lt;b&gt;jQuery Mobile&lt;/b&gt;. But there is another Mobile Framework named "&lt;b&gt;Sencha Touch&lt;/b&gt;" which is developed by the same person who has created &lt;b&gt;jQTouch&lt;/b&gt;. Before you move further to know more about &lt;b&gt;Sencha Touch&lt;/b&gt;, please read &lt;a href="http://jquerybyexample.blogspot.in/2012/02/jqtouch-vs-jquery-mobile.html" rel="nofollow"&gt;&lt;b&gt;jQTouch vs jQuery Mobile&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: x-large;"&gt;&lt;b&gt;&lt;u&gt;What is Sencha Touch?&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Sencha Touch is the world's first mobile web app development framework built specifically to leverage HTML5, CSS3, and Javascript for the highest level of power, flexibility, and optimization. It make specific use of HTML5 to deliver components like audio and video, as well as a localStorage proxy for saving data offline. It makes extensive use of CSS3 in our stylesheets to provide the most robust styling layer possible.&lt;br /&gt;
&lt;br /&gt;
Sencha Touch is a cross-platform framework aimed at next generation, touch enabled, devices. It's currently compatible with Apple iOS 3+, Android 2.1+, and BlackBerry 6+ devices. &lt;br /&gt;
&lt;br /&gt;
Altogether, the entire library is under 120kb (gzipped and minified), and it's trivial to make that number even smaller by disabling unused components or styles.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UO_kbdnszIo/Tyu5el92ddI/AAAAAAAABqY/-Kh3WpQyG58/s1600/SenchaTouch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://2.bp.blogspot.com/-UO_kbdnszIo/Tyu5el92ddI/AAAAAAAABqY/-Kh3WpQyG58/s320/SenchaTouch.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;&lt;u&gt;Features of Sencha Touch&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Easy Setup&lt;/li&gt;
&lt;li&gt;Sencha Touch includes a set of graphical user interface GUI-based controls or "components" for use within mobile web applications. These components are highly optimized for touch input.&lt;/li&gt;
&lt;li&gt;Built-in transition effects&lt;/li&gt;
&lt;li&gt;Resolution Independent&lt;/li&gt;
&lt;li&gt;Touch event management: It supports events like Tap, Double Tap, Pinch, Swipe and Scroll.&lt;/li&gt;
&lt;li&gt;Application data support: Sencha Touch has a data package to support web standards for data interchange with servers such as Ajax and JSONP&lt;/li&gt;
&lt;/ul&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px; text-align: center;"&gt;&lt;b&gt;&lt;a href="http://www.sencha.com/products/touch" rel="nofollow" target="_blank"&gt;&lt;span style="color: blue;"&gt;Official Website&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="color: #990000; font-size: x-large;"&gt;&lt;b&gt;&lt;u&gt;Differences&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;jQuery Mobile supports more number of mobile platform as compare to Sencha Touch. Sencha touch only supports iOS, Android and recently Blackberry.&lt;/li&gt;
&lt;li&gt;jQuery Mobile and Sencha touch both provides great UI features with lots of control but Sencha touch wins here. Sencha Touch offers a bit more like lots of icons, or built-in maps.﻿&lt;/li&gt;
&lt;li&gt;jQuery Mobile is easy to use as Sencha Touch is completely Javascript. Your application takes place in js files, dealing with js classes. On the other hand, jQueryMobile is markup-driven. Sencha Touch is an extension of the Ext JS framework. It has a more native language feel than html and does not follow open standards. For example, the entire &amp;lt;body&amp;gt; of a webpage is generated in javascript.&lt;/li&gt;
&lt;li&gt;jQuery Mobile is easy to learn but for Sencha touch one need to put extra effort to learn it. In fact the documentation of Sencha touch is not comprehensive but jQuery Mobile documentation is quite good.&lt;/li&gt;
&lt;li&gt;jQuery mobile is light weight compare to Sencha touch.&lt;/li&gt;
&lt;li&gt;Sencha Touch supports a more MVC style application design, whereas jQuery mobile will simply be a load of markup and a load of jQuery script converting your HTML elements into touch friendly interface components.&lt;/li&gt;
&lt;li&gt;jQuery Mobile Framework is easy to integrate with other technologies.&lt;/li&gt;
&lt;li&gt;jQuery Mobile is free where Sencha Touch is available free of charge for commercial and open source application development. However, embedding Sencha Touch in a web application builder or software development kit (SDK) requires a paid commercial OEM license agreement. Read &lt;a href="http://www.sencha.com/store/licensing-faq/" rel="nofollow" target="_blank"&gt;more&lt;/a&gt; about Sencha Touch Licensing FAQ.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
In the end, no mobile framework is perfect and the choice depends on the project requirement. But my favorite is jQuery Mobile.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6204809977202616064?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6204809977202616064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/jqtouch-vs-sencha-touch-vs-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6204809977202616064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6204809977202616064'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/jqtouch-vs-sencha-touch-vs-jquery.html' title='jQTouch Vs Sencha Touch vs jQuery Mobile'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-UO_kbdnszIo/Tyu5el92ddI/AAAAAAAABqY/-Kh3WpQyG58/s72-c/SenchaTouch.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4634222297019274351</id><published>2012-02-01T10:30:00.000+05:30</published><updated>2012-02-01T10:30:00.864+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='jQTouch'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQTouch vs jQuery Mobile</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
Today, mobile is a very common object and that's why Mobile frameworks are in very much demand. In this post, I will show you brief walk through of 2 most popular jQuery based mobile framework "&lt;b&gt;jQTouch&lt;/b&gt;" and "&lt;b&gt;jQuery Mobile&lt;/b&gt;". And I will also explain the &lt;b&gt;differences&lt;/b&gt; between "&lt;b&gt;jQTouch&lt;/b&gt;" and "&lt;b&gt;jQuery Mobile&lt;/b&gt;".&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-RjHyc-_kyYE/TyfF_v9EWhI/AAAAAAAABqM/9KmOahjW_DM/s1600/jQTouch+vs+jQueryMobile.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://1.bp.blogspot.com/-RjHyc-_kyYE/TyfF_v9EWhI/AAAAAAAABqM/9KmOahjW_DM/s200/jQTouch+vs+jQueryMobile.PNG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: x-large;"&gt;&lt;b&gt;&lt;u&gt;What is jQTouch?&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
First thing I want to clear about jQTouch is that "&lt;b&gt;It is not a framework&lt;/b&gt;". Its a myth that it is a framework. (&lt;i&gt;Though I have also mentioned earlier in my post, but that's a myth&lt;/i&gt;) &amp;nbsp;jQTouch is a jQuery plugin for mobile web development on the iPhone, Android, iPod Touch, and other forward-thinking devices. It supports minified code, native WebKit animations, swipe detection, auto list navigation, flexible themes, has the ability to be tweaked with custom extensions. jQTouch is built by David Kaneda and maintained by Jonathan Stark.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-l4D6PFt_mnI/TyfEcvqN_bI/AAAAAAAABp8/3rpTCGDu1u4/s1600/jQTouch.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-l4D6PFt_mnI/TyfEcvqN_bI/AAAAAAAABp8/3rpTCGDu1u4/s320/jQTouch.PNG" width="170" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;&lt;u&gt;Features of jQTouch&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Easy Setup&lt;/li&gt;
&lt;li&gt;Native WebKit Animations&lt;/li&gt;
&lt;li&gt;Image Preloading&lt;/li&gt;
&lt;li&gt;Callback Events&lt;/li&gt;
&lt;li&gt;Flexible Themes&lt;/li&gt;
&lt;li&gt;MIT Licensed&lt;/li&gt;
&lt;li&gt;Swipe Detection&lt;/li&gt;
&lt;li&gt;Extensions&lt;/li&gt;
&lt;li&gt;Improved File Size&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
jQTouch is focussed strictly on the iPhone, iPod Touch, and soon, Android. jQTouch progressively enhances HTML and CSS, so that less capable phones are still be able to browse content.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px; text-align: center;"&gt;&lt;b&gt;&lt;a href="http://jqtouch.com/" rel="nofollow" target="_blank"&gt;&lt;span style="color: blue;"&gt;Official Website&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span style="color: #990000; font-size: x-large;"&gt;&lt;u&gt;What is jQuery Mobile?&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
jQuery Mobile is touch-Optimized Web Framework for Smartphones &amp;amp; Tablets. A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-dna8xAss2_8/TyfD1__NWsI/AAAAAAAABps/7xp7XUxryL8/s1600/jQueryMobile.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="312" src="http://3.bp.blogspot.com/-dna8xAss2_8/TyfD1__NWsI/AAAAAAAABps/7xp7XUxryL8/s320/jQueryMobile.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-size: large;"&gt;&lt;b&gt;&lt;u&gt;Features of jQuery Mobile&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Built on jQuery core&lt;/li&gt;
&lt;li&gt;Compatible with all major mobile, tablet, e-reader &amp;amp; desktop platforms&lt;/li&gt;
&lt;li&gt;Lightweight size and minimal image dependencies for speed&lt;/li&gt;
&lt;li&gt;Modular architecture&lt;/li&gt;
&lt;li&gt;HTML5 Markup-driven configuration&lt;/li&gt;
&lt;li&gt;Progressive enhancement&lt;/li&gt;
&lt;li&gt;Powerful Ajax-powered navigation system&lt;/li&gt;
&lt;li&gt;Touch and mouse event support &lt;/li&gt;
&lt;li&gt;Unified UI widgets&lt;/li&gt;
&lt;li&gt;Powerful theming framework &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
jQuery Mobile is built upon standard, semantic HTML, allowing pages to be accessible to the broadest range of devices possible. For A-Grade browsers, many of the components in jQuery Mobile leverage techniques such as focus management, keyboard navigation, and HTML attributes specified in the W3C's WAI-ARIA specification.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px; text-align: center;"&gt;&lt;b&gt;&lt;a href="http://jquerymobile.com/" rel="nofollow" target="_blank"&gt;&lt;span style="color: blue;"&gt;Official Website&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="color: #990000; font-size: x-large;"&gt;&lt;b&gt;&lt;u&gt;Differences&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;As I have stated earlier that jQTouch is not a framework, it is plugin. Where jQuery Mobile is framework created for Mobile and tablet devices.&lt;/li&gt;
&lt;li&gt;jQTouch is optimized for WebKit.Therefore jQTouch might be preferable if you plan on specifically targeting users tied to an iOS- or Android-based device. Where jQuery Mobile is compatible with all major mobile and tablet platforms. &lt;/li&gt;
&lt;li&gt;jQTouch provides access to Geolocation (Access to device GPS Data) where jQuery Mobile doesn't provide this hardware access(to date). &lt;/li&gt;
&lt;li&gt;jQTouch is focused on small screen devices. From &lt;a href="http://blog.jqtouch.com/post/726299094/jqtouch-roadmap" rel="nofollow" target="_blank"&gt;their blog&lt;/a&gt;.&lt;br /&gt;
&lt;i&gt;"&lt;span style="background-color: #cccccc;"&gt;Apps developed with jQTouch will certainly run fine on iPads and other tablet devices, but we aren’t going to automagically convert to a more tablet-friendly UI that takes advantage of the additional real estate.&lt;/span&gt;"&lt;br /&gt;
&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In terms of performance jQTouch is better than jQuery Mobile. If you are targeting only Webkit devices then go for jQTouch.&lt;/li&gt;
&lt;li&gt;Though jQTouch project is technically active, the original author has moved on and development seems to have slowed where jQuery Mobile Announced in August 2010, it’s quickly progressed to a very functional Alpha 2.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
This guy named "&lt;a href="http://www.markus-falk.com/index_en.html" target="_blank"&gt;Markus Falk&lt;/a&gt;" has created a frequently-updated chart that shows of pros and cons of all the mobile frameworks out there.&lt;br /&gt;
&lt;br /&gt;
The chart displays the rendering engines supported, target platform, hardware, development languages, license and UI features for each framework. Plus, it also has a wizard feature which allows to filter the framework based on various functionality.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.markus-falk.com/mobile-frameworks-comparison-chart/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-FkyCcVEwxpM/Tye_MCbGxkI/AAAAAAAABpk/AoihfXvthXA/s1600/Mobile+Framework+Comparison.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px; text-align: center;"&gt;&lt;b&gt;&lt;a href="http://www.markus-falk.com/mobile-frameworks-comparison-chart/" rel="nofollow" target="_blank"&gt;&lt;span style="color: blue;"&gt;View Comparison Chart&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4634222297019274351?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4634222297019274351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/jqtouch-vs-jquery-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4634222297019274351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4634222297019274351'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/02/jqtouch-vs-jquery-mobile.html' title='jQTouch vs jQuery Mobile'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-RjHyc-_kyYE/TyfF_v9EWhI/AAAAAAAABqM/9KmOahjW_DM/s72-c/jQTouch+vs+jQueryMobile.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2872903391406939354</id><published>2012-01-25T10:30:00.000+05:30</published><updated>2012-01-25T13:57:55.284+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery innerText'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Set innerText using jQuery</title><content type='html'>&lt;br /&gt;
In this post, I will explain that how to set &lt;b&gt;innerText &lt;/b&gt;using &lt;b&gt;jQuery&lt;/b&gt;. But do you know what is &lt;b&gt;innerText&lt;/b&gt;? &lt;b&gt;innerText&lt;/b&gt; term means text which appears between the start tag and end tag. In JavaScript, the "inner" text of an HTML element refers to the text between any set of HTML tags and using &lt;b&gt;innerText&lt;/b&gt; property, one can set the text in JavaScript. But to set &lt;b&gt;innerText&lt;/b&gt; using &lt;b&gt;jQuery&lt;/b&gt;, use text() method. &lt;b&gt;jQuery&lt;/b&gt; text() method sets the innerText of any element. Well, we can still club the jQuery and JavaScript without any problem and it will work.  A example of innerText would be below. &lt;br /&gt;
&lt;pre class='brush:javascript'&gt;&amp;lt;span&amp;gt;I am innerText of span element&amp;lt;/span&amp;gt;&lt;/pre&gt;As I mentioned earlier that one can still use JavaScript in jQuery code so that means one can still use &lt;b&gt;innerText&lt;/b&gt; in jQuery to set &lt;b&gt;innerText&lt;/b&gt; of any element but there is a problem with this property. This property doesn't work with Firefox. It works quite well with IE and Chrome. So the similar property for Firefox is &lt;b&gt;textContent&lt;/b&gt;. But textContent doesn't work with other browsers like IE and Chrome. &lt;br /&gt;
&lt;br /&gt;
As we know that one of the advantage of jQuery is browser independence. So the text() method works in all the browsers. So it works like the textContent property in Firefox and innerText in IE.&lt;br /&gt;
&lt;br /&gt;
Using text() function, you can not only set the text but you can also get the text of element. For example, if you want to set text for any div with id "dvElement" then use following code.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function()
{
    $("#dvExample").text('I am new content of the div.')
});
&lt;/pre&gt;And to get the text of the div,&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function()
{
    $("#dvExample").text('I am new content of the div.')
    var dvText = $("#dvExample").text();
    alert(dvText);          
});
&lt;/pre&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_pP4JIb2v5LA/TEZ0WJw3k6I/AAAAAAAABQ4/60xnf3qoOF8/s1600/SetText.PNG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pP4JIb2v5LA/TEZ0WJw3k6I/AAAAAAAABQ4/60xnf3qoOF8/s320/SetText.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2872903391406939354?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2872903391406939354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/set-innertext-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2872903391406939354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2872903391406939354'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/set-innertext-using-jquery.html' title='Set innerText using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pP4JIb2v5LA/TEZ0WJw3k6I/AAAAAAAABQ4/60xnf3qoOF8/s72-c/SetText.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5327566273058288480</id><published>2012-01-24T10:30:00.000+05:30</published><updated>2012-01-24T10:30:01.955+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Write and test your jQuery code online</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
In this post, you will see 3 different website which provides web playground to write and test your jQuery code online. The advantage of using these online playground is that one can use it as an online editor for snippets build from HTML, CSS and JavaScript. The code can then be shared with others, embedded on a blog.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://jsfiddle.net/"&gt;&lt;b&gt;&lt;span style="color: purple; font-size: large;"&gt;jsFiddle&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
The first website is "&lt;a href="http://jsfiddle.net/"&gt;&lt;b&gt;jsFiddle&lt;/b&gt;&lt;/a&gt;", which provides an online environment where anyone can test his code against many Javascript frameworks like jQuery, MooTools, Dojo, Prototype and many more.. The one very important feature of this website is as and when new version of any library is released, it is available on &lt;a href="http://jsfiddle.net/"&gt;&lt;b&gt;jsFiddle&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-nAfehZwqHv4/Tx0qPRkddgI/AAAAAAAABo0/FI7GX3ZYYTM/s1600/jsFiddle+-+Online+Editor+for+the+Web+%2528JavaScript%252C+MooTools%252C+jQuery%252C+Prototype%252C+YUI%252C+Glow+and+Dojo%252C+HTML%252C+CSS%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="452" src="http://4.bp.blogspot.com/-nAfehZwqHv4/Tx0qPRkddgI/AAAAAAAABo0/FI7GX3ZYYTM/s640/jsFiddle+-+Online+Editor+for+the+Web+%2528JavaScript%252C+MooTools%252C+jQuery%252C+Prototype%252C+YUI%252C+Glow+and+Dojo%252C+HTML%252C+CSS%2529.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;As you can see from the above screenshot, the website is divided into 5 parts. On the very left, you need to select your framework and its version as well. Suppose, you want to test your code against jQuery then select jQuery and its related version. You are also allowed to test jQuery UI. If you also want to add any external javascript or css, then you can also add its URL under "Add Resoruce" Tab.&lt;br /&gt;
&lt;br /&gt;
Other parts of the interface are HTML editor, CSS editor, Script editor and your output. As the name suggest, Put all your HTML code in HTML editor, CSS code in CSS editor and Javascript/jQuery code in Script editor. Output section is used to see the output.&lt;br /&gt;
&lt;br /&gt;
Write your code and hit run button on the top. And you will see the output in output section. You can also save your code (Save button). Once you save the code, then copy the URL and use it for future reference. It also maintains version. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Features:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Inbuilt mechanism to reference any of the javascript library&lt;/li&gt;
&lt;li&gt;Supports of latest and previous version of libraries&lt;/li&gt;
&lt;li&gt;Maintains different versions&lt;/li&gt;
&lt;li&gt;Support of Tidy up which arranges your messy code&lt;/li&gt;
&lt;li&gt;Support of jsLint, (Javascript code quality tool)&lt;/li&gt;
&lt;li&gt;Allows to share the page with social media websites.&lt;/li&gt;
&lt;li&gt;Support to mark the first version as base version.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
I use this website to make demo for my post to share with my you guys. There are many features which you can explore. So what are waiting for? Start using &lt;a href="http://jsfiddle.net/"&gt;&lt;b&gt;jsFiddle&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://code.google.com/apis/ajax/playground/#jquery"&gt;&lt;b&gt;&lt;span style="color: purple; font-size: large;"&gt;Google Code PlayGround&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Next is Google Code PlayGround developed by Google to write and test not only jQuery but one can also write and test against the APIs provides by various Google services like Google Maps, YouTube, Google Earth and many more...&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ccvgPEYO6tg/Tx0kZHXR-pI/AAAAAAAABok/eDJwq2qviU0/s1600/Google+Code+Playground.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="489" src="http://2.bp.blogspot.com/-ccvgPEYO6tg/Tx0kZHXR-pI/AAAAAAAABok/eDJwq2qviU0/s640/Google+Code+Playground.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
As you can see from the screenshot, website interface is divided into 3 parts.&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;First part to select libraries. There are various libraries available.&lt;/li&gt;
&lt;li&gt;Second to write your HTML, CSS and Script.&lt;/li&gt;
&lt;li&gt;Third is Output section.&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;The good thing about this website is you can also debug your code step by step which is a very nice feature.&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://jsbin.com/"&gt;&lt;b&gt;&lt;span style="color: purple; font-size: large;"&gt;jsbin&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;a href="http://jsbin.com/"&gt;&lt;b&gt;jsBin&lt;/b&gt;&lt;/a&gt; is another cool website to fulfill your purpose. Before jsFiddle, I used this website a lot to create demos for my blog post. Like jsFiddle, this website also provides separate section for HTML, Script and Real Time Preview.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://jsbin.com/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="354" src="http://3.bp.blogspot.com/-6pAdJEuKK44/Tx1FTHfXADI/AAAAAAAABo8/6h3FLOTd9yg/s640/jsbin.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href="http://jsbin.com/"&gt;&lt;b&gt;jsBin&lt;/b&gt;&lt;/a&gt; also provide 2 different views "Code" and "Render". When you click on Render view, you will see the output section in complete page which is sometimes very useful as the Real Time Preview section is small and it sometimes may not be useful to see the complete output.&lt;br /&gt;
&lt;br /&gt;
One disadvantage with this website is, it does not provide an inbuilt mechanism to select any library. You need to reference it from any of the CDN. Read "&lt;a href="http://jquerybyexample.blogspot.com/2012/01/why-to-use-google-hosted-jquery-cdn.html"&gt;Why to use Google hosted jQuery CDN&lt;/a&gt;". &lt;br /&gt;
&lt;br /&gt;
I have create a sample demo using &lt;a href="http://jsbin.com/"&gt;&lt;b&gt;jsBin&lt;/b&gt;&lt;/a&gt;. Visit&amp;nbsp;&lt;a href="http://jsbin.com/aracuf/edit"&gt;http://jsbin.com/aracuf/edit&lt;/a&gt;&lt;br /&gt;
Like jsFiddle, jsBin also maintains different version. See URL &lt;a href="http://jsbin.com/aracuf/2/edit#source"&gt;http://jsbin.com/aracuf/2/edit#source&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Visit &lt;a href="http://jsbin.tumblr.com/"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt; to find out all the features of &lt;a href="http://jsbin.com/"&gt;&lt;b&gt;jsBin&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Personally, I prefer&amp;nbsp;&lt;b&gt;&lt;a href="http://jsfiddle.net/"&gt;jsFiddle&lt;/a&gt;&lt;/b&gt; due to its wide range of features. So what are you waiting for. Just play with these sites and start using them regularly for your jQuery code.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5327566273058288480?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5327566273058288480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/write-and-test-your-jquery-code-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5327566273058288480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5327566273058288480'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/write-and-test-your-jquery-code-online.html' title='Write and test your jQuery code online'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-nAfehZwqHv4/Tx0qPRkddgI/AAAAAAAABo0/FI7GX3ZYYTM/s72-c/jsFiddle+-+Online+Editor+for+the+Web+%2528JavaScript%252C+MooTools%252C+jQuery%252C+Prototype%252C+YUI%252C+Glow+and+Dojo%252C+HTML%252C+CSS%2529.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4438544463164186491</id><published>2012-01-23T10:30:00.000+05:30</published><updated>2012-01-23T11:06:12.946+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery DatePicker'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI DatePicker'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>End Date should not be greater than Start Date using jQuery Date Picker</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;How many times you have seen this message on websites? OR as a programmer, you should have implemented this very common date validation which is "&lt;b&gt;End Date should not be greater than Start Date&lt;/b&gt;". Gone those days where you write long java script functions for date validation and alert/show a error message on screen. It will be a nice feature where you don't allow end user to make mistake. Okay, enough talking now. In this post I will show you how to make "&lt;b&gt;End Date should not be greater than Start Date&lt;/b&gt;" using &lt;b&gt;jQuery and &lt;a href="http://jquerybyexample.blogspot.com/2010/06/implement-jqueryui-datepicker-with.html"&gt;jQuery UI Datepicker&lt;/a&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="color: purple;"&gt;Read my series of articles about &lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%20UI%20DatePicker"&gt;jQuery UI Datepicker&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Required Resources:&lt;br /&gt;
1. &lt;a href="http://docs.jquery.com/Downloading_jQuery" target="_blank"&gt;jQuery&lt;/a&gt;&lt;br /&gt;
2. &lt;a href="http://jqueryui.com/download" target="_blank"&gt;jQuery UI and jQuery UI CSS&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Okay, so there are mainly 2 kind of validation conditions which are,&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;Start date should not greater than end date.&lt;/li&gt;
&lt;li&gt;End date should not less then start date.&lt;/li&gt;
&lt;/ol&gt;So let's put 2 textboxes "txtFromDate" and "txtToDate" and assign Date picker to it. With jQuery UI Date picker, there is an event "onSelect" which fires when any date is selected. So using this event, set the date range for other date pickers. &lt;br /&gt;
&lt;br /&gt;
For example, when from date is selected, then using this "onSelect" event we will set the "minDate" attribute of "txtToDate" textbox to the selected date in "txtFromDate". What it does is that, dates less than the selected from date will be disabled in "txtToDate" textbox. And same way set the "MaxDate" attribute for "txtFromDate" in onSelect event of "txtToDate" textbox. Below is the complete jQuery code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    $("#txtFromDate").datepicker({
        numberOfMonths: 2,
        onSelect: function(selected) {
          $("#txtToDate").datepicker("option","minDate", selected)
        }
    });
    $("#txtToDate").datepicker({ 
        numberOfMonths: 2,
        onSelect: function(selected) {
           $("#txtFromDate").datepicker("option","maxDate", selected)
        }
    });  
});
&lt;/pre&gt;"numberOfMonths" attribute allows to display multiple months in date picker. Read &lt;a href="http://jquerybyexample.blogspot.com/2010/06/implement-jqueryui-datepicker-with.html"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt; about all the attribute of jQuery UI Datepicker.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;See result below.&lt;/b&gt;  &lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/CkfDP/embedded/result,js,html" style="height: 300px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See Complete &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/CkfDP/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Okay, this is interesting. But there is one more important condition which is also needed.&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;Start date should not be greater than today's date.&lt;/li&gt;
&lt;/ol&gt;Along with, there is one more functionality which you must have seen like many websites like flight booking, railway booking where there is a limit for To Date as well. For example, in India train ticket booking is only possible for next 90 days from the current date.&lt;br /&gt;
&lt;br /&gt;
Okay so let's see that how we can implement these 2 conditions as well using jQuery UI DatePicker. &lt;br /&gt;
&lt;br /&gt;
jQuery UI DatePicker provides attributes "MinDate" and "MaxDate" which allows to set minimum permissible date and maximum permissible date. So when "minDate" attribute is set to 0, then past dates will become disable from current date. And set "maxDate" to "+90D" which will make all the future dates disable except 90 days from current date. See below jQuery code. In this example, I have set "maxDate" to 60 days plus only. &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    $("#txtFromDate").datepicker({
        minDate: 0,
        maxDate: "+60D",
        numberOfMonths: 2,
        onSelect: function(selected) {
          $("#txtToDate").datepicker("option","minDate", selected)
        }
    });
    $("#txtToDate").datepicker({ 
        minDate: 0,
        maxDate:"+60D",
        numberOfMonths: 2,
        onSelect: function(selected) {
           $("#txtFromDate").datepicker("option","maxDate", selected)
        }
    });  
});
&lt;/pre&gt;&lt;b&gt;See result below.&lt;/b&gt;  &lt;iframe allowfullscreen="allowfullscreen" frameborder="1" src="http://jsfiddle.net/jquerybyexample/LGw6F/embedded/result,js,html" style="height: 350px; width: 100%;"&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See Complete &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/LGw6F/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;One advice: If you are still using Java Script, stop using it and switch to jQuery.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4438544463164186491?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4438544463164186491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/end-date-should-not-be-greater-than.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4438544463164186491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4438544463164186491'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/end-date-should-not-be-greater-than.html' title='End Date should not be greater than Start Date using jQuery Date Picker'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7820152428328575900</id><published>2012-01-20T10:43:00.000+05:30</published><updated>2012-01-20T10:54:12.946+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Date Picker'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI DatePicker'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>5 jQuery DatePicker Plugin collection</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
There is no doubt that website are getting more and more user friendly these days and with the growth in technologies, it is not that difficult to make such websites. For example,&amp;nbsp;you will not find simple input boxes or 3 select boxes (day, month and year)&amp;nbsp;for date input. With jQuery, jQuery UI and Ajax, things looks pretty awesome and catching.&lt;br /&gt;
&lt;br /&gt;
In this post, I have put together a collection of some of the best jQuery DatePicker plugins which are&amp;nbsp;very user friendly&amp;nbsp;can be easily integrated with minor modifications. These plugins are developed using jQuery, jQuery UI, Ajax.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://code.gautamlad.com/glDatePicker/#about"&gt;&lt;span style="color: purple;"&gt;glDatePicker&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://code.gautamlad.com/glDatePicker/"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://code.gautamlad.com/glDatePicker/#download"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;Download&lt;/b&gt; &lt;/span&gt;&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://code.gautamlad.com/glDatePicker/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="206" src="http://1.bp.blogspot.com/-0CGZDtwUkdQ/Txjupfw_GZI/AAAAAAAABn0/NXsOxjYvBkk/s400/glDatePicker+-+A+simple%252C+customizable%252C+lightweight+date+picker+calendar+plugin+for+jQuery.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://code.gautamlad.com/glDatePicker/#about"&gt;&lt;span style="color: purple;"&gt;Ajax Booking Calendar Pro&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://codecanyon.net/item/ajax-booking-calendar-pro-jquery-plugin/full_screen_preview/244645?ref=themespotters"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://codecanyon.net/item/ajax-booking-calendar-pro-jquery-plugin/244645?ref=themespotters"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;Download&lt;/span&gt;&lt;/b&gt;&lt;/a&gt; )&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://codecanyon.net/item/ajax-booking-calendar-pro-jquery-plugin/full_screen_preview/244645?ref=themespotters" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/-URtDimqxQQM/Txjup9grt1I/AAAAAAAABn4/nMnFuR6K0R0/s400/AJAX+Booking+Calendar+Pro+%2528jQuery+Plugin%2529+Preview+-+CodeCanyon.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://code.gautamlad.com/glDatePicker/#about"&gt;&lt;span style="color: purple;"&gt;jQuery.calendarPicker&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;b&gt;&lt;a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPicker.zip"&gt;&lt;span style="color: #990000;"&gt;Download&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; )&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="125" src="http://1.bp.blogspot.com/-99hpXBqWUX4/TxjuqTq3xfI/AAAAAAAABoE/DafK-AOkEfQ/s400/BugsVoice+-+turn+bugs+into+opportunities.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/"&gt;&lt;span style="color: purple;"&gt;Date Range Picker using jQuery UI 1.6 and jQuery UI CSS Framework&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://www.filamentgroup.com/examples/daterangepicker_v2/index2.php"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://www.filamentgroup.com/examples/daterangepicker_v2/FilamentGroup_daterangepicker.zip"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;Download&lt;/b&gt;&lt;/span&gt; &lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://4.bp.blogspot.com/-p5bxnn-Gudc/Txjur-UOq4I/AAAAAAAABoM/kwPppjfiypA/s400/Filament+Group+Lab+Example+From+Page+from-+Date+Range+Picker+using+jQuery+UI+1.6+and+jQuery+UI+CSS+Framework.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://code.gautamlad.com/glDatePicker/#about"&gt;&lt;span style="color: purple;"&gt;wdCalendar – jQuery Based Google Calendar Clone&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
( &lt;b&gt;&lt;a href="http://www.web-delicious.com/jquery-plugins-demo/wdCalendar/sample.php"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt; &lt;/b&gt;| &lt;a href="http://www.web-delicious.com/jquery-plugins-demo/wdCalendar.zip"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;Download&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; )&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.web-delicious.com/jquery-plugins-demo/wdCalendar/sample.php" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="283" src="http://1.bp.blogspot.com/-QJvlNKH6f2M/TxjuvGpmD5I/AAAAAAAABoU/zVRbqZEPflk/s400/My+Calendar.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7820152428328575900?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7820152428328575900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/5-jquery-datepicker-plugin-collection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7820152428328575900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7820152428328575900'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/5-jquery-datepicker-plugin-collection.html' title='5 jQuery DatePicker Plugin collection'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-0CGZDtwUkdQ/Txjupfw_GZI/AAAAAAAABn0/NXsOxjYvBkk/s72-c/glDatePicker+-+A+simple%252C+customizable%252C+lightweight+date+picker+calendar+plugin+for+jQuery.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3385328360218555028</id><published>2012-01-18T10:30:00.000+05:30</published><updated>2012-01-19T11:06:11.592+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.7'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to use jQuery on() and off() method</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;a href="http://www.andismith.com/blog/2011/11/on-and-off/"&gt;&lt;span style="color: #990000;"&gt;Using jQuery .on() and .off() – AndiSmith.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
jQuery 1.7 was &lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/11/whats-new-in-jquery-17.html" target="_blank"&gt;released&lt;/a&gt; &lt;/b&gt;in month of November last year and with the jQuery 1.7, do you know that &lt;a href="http://jquerybyexample.blogspot.com/2010/06/jquery-live-function-exampledemo.html" target="_blank"&gt;&lt;b&gt;live()&lt;/b&gt;&lt;/a&gt; method is deprecated. And new method was introduced to replace live() called "&lt;b&gt;on()&lt;/b&gt;". "jQuery &lt;b&gt;on()&lt;/b&gt;" is a new way to attach events to selectors. The on() event handler is designed to replace both the .bind() and .delegate() event handlers.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-NjYbZ_EL01A/Txeroo8E02I/AAAAAAAABno/TSMf2kQ68Ck/s1600/jQuery%2BOn-Off.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-NjYbZ_EL01A/Txeroo8E02I/AAAAAAAABno/TSMf2kQ68Ck/s200/jQuery%2BOn-Off.jpg" width="176" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I have found an &lt;a href="http://www.andismith.com/blog/2011/11/on-and-off/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;article&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; with the explanation of these new functions. Along with explanation, it also throws light on some other aspects to the changes in jQuery 1.7+ that one should keep in mind.&lt;br /&gt;
&lt;br /&gt;
Also read, "&lt;a href="http://jquerybyexample.blogspot.com/2010/08/bind-vs-live-vs-delegate-function.html" target="_blank"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;bind() vs live() vs delegate() method&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;"&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Why live was deprecated()&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
There are a number of problems with .live(), especially with poor performance on large pages, a slower response or unexpected behaviour due to .live() events being attached to the document element. Unfortunately there are still a large number of developers using .live() in their code. If you’re one of them, please stop. See "&lt;a href="http://www.ultimatewebtips.com/why-jquery-live-is-a-bad-option-to-use/" target="_blank"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;Why .live() is a Bad Option&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;" for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3385328360218555028?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3385328360218555028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/how-to-use-jquery-on-and-off-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3385328360218555028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3385328360218555028'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/how-to-use-jquery-on-and-off-method.html' title='How to use jQuery on() and off() method'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-NjYbZ_EL01A/Txeroo8E02I/AAAAAAAABno/TSMf2kQ68Ck/s72-c/jQuery%2BOn-Off.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8848037488351199920</id><published>2012-01-17T11:00:00.000+05:30</published><updated>2012-02-26T12:37:06.857+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Array'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Difference between sorting string array and numerical array in jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To sort any array, there is a predefined method called "sort" which sorts the array. sort() method sorts the string array in alphabetical order. This method sorts on the basis of the ASCII values, so it is better to have all uniform names. That is, they must begin with either uppercase or lowercase, but not mixed case. So to sort any string array use the sort method. Below jQuery code sort the string array. &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  var list= [ "jQuery", "Dojo", "JavaScript", "Ajax"];
  $('#alltech').html(list.join(""));
  list = list.sort();
  $('#sorted').html(list.join(""));
})
&lt;/pre&gt;&lt;b&gt;See result below.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe style="width: 100%; height: 270px" src="http://jsfiddle.net/jquerybyexample/xvjAW/embedded/result,js,html" allowfullscreen="allowfullscreen" frameborder="1"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See Complete &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/xvjAW/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Now, declare any numerical array and try to use the sort method on this. Just try the below code to check the output.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  var list= [ 45, 32, 98, 24, 16, 9, 3];
  $('#allnumber').html(list.join(""));
  list = list.sort();
  $('#sorted').html(list.join(""));
})
&lt;/pre&gt;&lt;b&gt;See result below.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe style="width: 100%; height: 370px" src="http://jsfiddle.net/jquerybyexample/AhUzZ/embedded/result,js,html" allowfullscreen="allowfullscreen" frameborder="1"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Surprised!!!!!!!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Well, the numerical values are not sorted correctly with the sort() method because as mentioned earlier that it considers the ASCII value of the first numerical digit of all numerical values for sorting purposes. To sort numerical values correctly, we must define a comparison function with sort().&lt;br /&gt;
&lt;br /&gt;
If we define a comparison function, then a pair of values from the array will be repeatedly sent to the function until all elements of the array are processed. In the comparison function, we thus write a statement considering the pair of values passed to it so that the function returns any of the following three values: &amp;lt;0, =0, or &amp;gt;0.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;When the function returns value &amp;lt;0, the second value (of the pair of array values sent to the function) is larger than the first value and hence must be pushed down the sorting order.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;When the function returns value &amp;gt;0, the first value is larger than the second value, so it must be pushed down the sorting order.&lt;/li&gt;
&lt;li&gt;When the function returns value =0, it means there is no need to change the sort order since the two values are same.&lt;/li&gt;
&lt;/ul&gt;&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  var list= [ 45, 32, 98, 24, 16, 9, 3];
  $('#allnumber').html(list.join(""));
  list = list.sort(function(a,b){
        return a-b;
    });
  $('#sorted').html(list.join(""));
})
&lt;/pre&gt;&lt;b&gt;See result below.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe style="width: 100%; height: 370px" src="http://jsfiddle.net/jquerybyexample/y6qgQ/embedded/result,js,html" allowfullscreen="allowfullscreen" frameborder="1"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See Complete &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/y6qgQ/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Hope you find this post useful.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Credit : jQuery Recipes&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8848037488351199920?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8848037488351199920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/difference-between-sorting-string-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8848037488351199920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8848037488351199920'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/difference-between-sorting-string-array.html' title='Difference between sorting string array and numerical array in jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7252230642258378803</id><published>2012-01-09T11:00:00.000+05:30</published><updated>2012-01-09T11:00:03.550+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to check textbox is readonly using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Previously I had posted about "&lt;a href="http://jquerybyexample.blogspot.com/2010/06/make-readonly-textbox-using-jquery.html"&gt;&lt;b&gt;How to make textbox readonly using jQuery&lt;/b&gt;&lt;/a&gt;". One of way is to make textbox readonly is to set "readonly" attribute to true. So use the same attribute "readonly" to find out whether textbox is readonly or not using jQuery.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    $("#txtReadonly").attr('readonly', true);
    var isReadonly = $("#txtReadonly").attr('readonly');
    alert('txtReadonly is not readonly ' + isReadonly);
    var isNotReadonly = $("#txtNotReadonly").attr('readonly');
    alert('txtNotReadonly is not readonly ' + isNotReadonly);
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Jh42c/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Jh42c/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7252230642258378803?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7252230642258378803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/how-to-check-textbox-is-readonly-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7252230642258378803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7252230642258378803'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/how-to-check-textbox-is-readonly-using.html' title='How to check textbox is readonly using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8686451038398837735</id><published>2012-01-05T08:00:00.000+05:30</published><updated>2012-01-05T22:37:20.474+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery CDN'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Why to use Google hosted jQuery CDN</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;Google&lt;/b&gt; is sea of free services. Do you know that &lt;b&gt;Google&lt;/b&gt; is also hosting &lt;b&gt;jQuery&lt;/b&gt; libraries on its &lt;b&gt; CDN(Content delivery network)&lt;/b&gt; and allows any website to use it for free. But why to use &lt;b&gt; Google hosted jQuery CDN&lt;/b&gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Cgxd5ORy65s/TwXYm6Ya_cI/AAAAAAAABnc/pxMNPeBtZ-4/s1600/Why+Google++Hosted+jQuery+CDN.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://4.bp.blogspot.com/-Cgxd5ORy65s/TwXYm6Ya_cI/AAAAAAAABnc/pxMNPeBtZ-4/s400/Why+Google++Hosted+jQuery+CDN.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
Advantage:&lt;/h3&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Caching: The most important benefit is caching. If any previously visited site by user is using jQuery from Google CDN then the cached version will be used. It will not be downloaded again.&lt;/li&gt;
&lt;li&gt;Reduce Load: It reduces the load on your web server as it downloads from Google server's.&lt;/li&gt;
&lt;li&gt;Serves fast : You will be also benefitted from speed point of view. As Google has dozen's of different servers around the web and it will download the jQuery from whichever server is closer to the user. Google's CDN has a very low latency, it can serve a resource faster than your webserver can.&lt;/li&gt;
&lt;li&gt;Parellel Downloading: As the js file is on a separate domain, modern browsers will download the script in parallel with scripts on your domain.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
How to use it?&lt;/h3&gt;
&lt;br /&gt;
There are 2 ways to load from Google CDN.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Method 1:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script  type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Method 2&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script src="http://www.google.com/jsapi" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;&amp;lt;!--
google.load("jquery", "1.7.1");
google.setOnLoadCallback(function() {
// Place init code here instead of $(document).ready()
});
// --&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
What if Google CDN is down?&lt;/h3&gt;
&lt;br /&gt;
It is a good idea to use CDN but what if the CDN is down (rare possibility though) but you never know in this world as anything can happen. So if you have loaded your jQuery from any CDN and it went down then your jQuery code will stop working and your client will start shouting.&lt;br /&gt;
&lt;br /&gt;
Hang on, there is a solution for this as well. Below given jQuery code checks whether jQuery is loaded from Google CDN or not, if not then it references the jQuery.js file from your folder.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
if (typeof jQuery == 'undefined')
{
  document.write(unescape("%3Cscript src='Scripts/jquery.1.7.1.min.js' type='text/javascript'%3E%3C/script%3E"));
}
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
It first loads the jQuery from Google CDN and then check the jQuery object. If jQuery is not loaded successfully then it will references the jQuery.js file from hard drive location. In this example, the jQuery.js is loaded from Scripts folder.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Few quick tips&lt;/h3&gt;
&lt;br /&gt;
If you want jQuery 1.7.1 you can use a url like this:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&lt;/pre&gt;
Suppose you want to use latest version of  1.7 release,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js&lt;/pre&gt;
If you always want to refer the latest version of jQuery,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&lt;/pre&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8686451038398837735?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8686451038398837735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/why-to-use-google-hosted-jquery-cdn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8686451038398837735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8686451038398837735'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/why-to-use-google-hosted-jquery-cdn.html' title='Why to use Google hosted jQuery CDN'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Cgxd5ORy65s/TwXYm6Ya_cI/AAAAAAAABnc/pxMNPeBtZ-4/s72-c/Why+Google++Hosted+jQuery+CDN.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5383782622686381733</id><published>2012-01-03T08:00:00.000+05:30</published><updated>2012-02-07T17:49:14.469+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.6'/><title type='text'>jQuery validation using class ".required" problem - Question from blog reader</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 14px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Read &lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.in/2011/04/validate-email-address-using-jquery.html" target="_blank"&gt;&lt;span style="color: #990000;"&gt;How to Validate email address using jQuery&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Well, 5 days back I received an mail from one of my reader, in which he had written that &lt;b&gt;&lt;i&gt;"I need to validation html page using Jquery by looping through Class attributes ["Class=Required"] if the label attribute contain "required" class then i should validate the alert the user "Please Enter your value" and set back the focus to null control to enter the value. Please suggest how to do this in Jquery coding".&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="color: purple;"&gt;Note: &lt;i&gt;I did not write the name of the blog reader because I am not sure if he wants his name here or not.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
He has a single HTML form with inputs like Name, Company, Job Title, Phone and Email. And on click of Submit, he wanted to validate the inputs which has "class=required". So I have created a demo page for his problem and send him the solution. &lt;br /&gt;
&lt;br /&gt;
Below is the jQuery code, which solves his problem. On click of Submit button, it iterates through all the input type which has ".required" class. And checks the value, if it is empty then display an alert and set focus to the textbox.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    $('#btnSubmit').click(function(){
        $("input.required").each(function(){
            if($(this).val().length == 0)
            {
               alert('Please Enter your value');
               $(this).focus(); 
               return false;
            }
        });
        //else submit your form.
    });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;span style="color: #990000;"&gt;&lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Jqy3M/" target="_blank"&gt;Demo&lt;/a&gt;&lt;/b&gt; &lt;/span&gt;and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Jqy3M/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Then very next day I received another email from him saying &lt;b&gt;&lt;i&gt;" I need to achieve through JQuery Validation, &amp;lt;Label&amp;gt; tag has the "class.required" attributes not the &amp;lt;Input&amp;gt; tag, those lable tag(s) has the "class.required" attributes only those needs to validates during use click the comman button and this JQuery script should be used globally across the website."&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So his problem was the label tag is having the class "required", not the input tag. The solution which I have provided to him assuming that input tags has the required class as he has not mentioned that the label tag has the ".required" class in his first email. In his next email, he had also sent me the HTML code. First take a look at HTML code. (I have not put the whole code.)&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;div class="formField"&amp;gt;
   &amp;lt;label for="txtFullName" class="required"&amp;gt;Name&amp;lt;/label&amp;gt; 
   &amp;lt;input id="txtFullName"  type="text" name="Full_Name" /&amp;gt;   
&amp;lt;/div&amp;gt;
&lt;/pre&gt;He was using class ".reuqired" with label along with HTML &lt;a href="http://www.w3schools.com/tags/att_label_for.asp" target="_blank"&gt;for&lt;/a&gt; attribute. The for attribute specifies which form element a label is bound to. So it put me in thoughts for 2 mins but I found a solution. This time, I was iterating through all the label which has ".required" class. And also getting the value of for attribute. As the for attribute value is same as the textbox id. So based on the for attribute value, I created object using &lt;a href="http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-examples.html" target="_blank"&gt;&lt;b&gt;jQuery selectors&lt;/b&gt;&lt;/a&gt;. And rest is equal to previous solution.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    $('#btnSubmit').click(function(){
        var bSubmit = true;
        $("label.required").each(function(){
            var txtAttrb = $(this).attr('for');
            if(txtAttrb.length &amp;gt; 0)
            {
                var txtVal = $("input[id=" + txtAttrb + "]");
                if(txtVal.val().length == 0)
                {
                   alert('Please Enter your value');
                   txtVal.focus(); 
                   bSubmit = false;
                   return false;
                }
            }
        });
        
        if(bSubmit == true)
        {
            //submit the form.
        }
    });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/dmGvy/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/dmGvy/" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Hope this helps you as well. If you are also stuck somewhere and need any help for jQuery, Please &lt;b&gt;&lt;a href="http://www.contactme.com/4ecc964be95bbc00010050a1?locale=en&amp;amp;r=http%3A%2F%2Fjquerybyexample.blogspot.com%2Fsearch%2Flabel%2FjQuery%2520Selectors&amp;amp;u=http%3A%2F%2Fjquerybyexample.blogspot.com%2F2011%2F05%2Fjquery-selectors-examples.html&amp;amp;f=4ecc964be95bbc00010050a1&amp;amp;ha=right&amp;amp;va=top&amp;amp;tx=Contact%20Us&amp;amp;c=003C68&amp;amp;vid=1349dc84bc9a9bb"&gt;contact us.&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5383782622686381733?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5383782622686381733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/jquery-validation-using-class-required.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5383782622686381733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5383782622686381733'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2012/01/jquery-validation-using-class-required.html' title='jQuery validation using class &quot;.required&quot; problem - Question from blog reader'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8767249947524847512</id><published>2011-12-30T19:34:00.000+05:30</published><updated>2011-12-30T19:34:11.502+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Most Popular jQuery article in 2011</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;With 2011 coming to an end and 2012 approaching fast, I have prepared a list of Most Popular jQuery articles on this blog for this year. This list have articles which were visited most throught out the world.&lt;br /&gt;
&lt;br /&gt;
I would like to thank every one who has visited this blog, subscribed to our &lt;a href="http://feeds.feedburner.com/JqueryByExample"&gt;&lt;b&gt;Feed&lt;/b&gt;&lt;/a&gt;, followed us on &lt;a href="http://twitter.com/jquerybyexample"&gt;&lt;b&gt;Twitter &lt;/b&gt;&lt;/a&gt;and &lt;a href="http://www.facebook.com/jQueryByExample"&gt;&lt;b&gt;Facebook &lt;/b&gt;&lt;/a&gt;and via putting your comments.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Most Popular jQuery articles which were visited most. Wish you a very happy and prosperous New Year 2012.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/split-function-in-jquery.html"&gt;Split function in jQuery&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-how-to-get-mouse-cursor.html"&gt;Jquery Tip: How to get mouse cursor position&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/bind-vs-live-vs-delegate-function.html"&gt;bind() vs live() vs delegate() function&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/07/jquery-does-not-work-properly-after.html"&gt;jQuery does not work properly after ajax partial postback&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/08/mostly-asked-jquery-interview-questions.html"&gt;Mostly asked jQuery interview questions list&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/08/mostly-used-and-essential-jquery-code.html"&gt;Mostly used and essential jQuery code examples&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/02/how-to-zoom-image-on-mouse-over-using.html"&gt;How to Zoom image on mouseover using jQuery&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/wow-we-have-jquery-mobile-now.html"&gt;Wow!!! We have jQuery Mobile now&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-next-textbox-on.html"&gt;How to set focus on next textbox on Enter Key using jQuery&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-how-to-check-if-element-is.html"&gt;jQuery Tip - How to check if element is empty&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/03/useful-jquery-code-examples-for-aspnet.html"&gt;Useful jQuery code examples for ASP.NET Controls&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/07/show-handpointer-cursor-on-image-button.html"&gt;Show Hand/Pointer cursor on image button with jQueryUI datepicker control&lt;/a&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Again I wish you a very happy and prosperous New Year 2012. Keep visiting this blog as you motivate me to write more and more.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8767249947524847512?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8767249947524847512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/most-popular-jquery-article-in-2011.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8767249947524847512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8767249947524847512'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/most-popular-jquery-article-in-2011.html' title='Most Popular jQuery article in 2011'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5016731719216675347</id><published>2011-12-24T23:29:00.000+05:30</published><updated>2011-12-25T18:37:01.268+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery docs'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Instant documentation for jQuey, CSS, HTML and JavaScript</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;It is always a good feeling to find everything what you need under a single roof. How about having instant documentation stuff. &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-y_iGc4B64fo/TvYR8MYDXiI/AAAAAAAABnE/bj4gfONQZ84/s1600/Documentation.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="128" width="128" src="http://4.bp.blogspot.com/-y_iGc4B64fo/TvYR8MYDXiI/AAAAAAAABnE/bj4gfONQZ84/s400/Documentation.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href="http://dochub.io" target="_blank"&gt;Dochub&lt;/a&gt; is collection of instant documentation of CSS, HTML, JavaScript and jQuery. But this documentation is not written by someone. Instead it fetches the CSS, HTML and JavaScript collection based on the user request from &lt;a href="https://developer.mozilla.org/" target="_blank"&gt;Mozilla developer network&lt;/a&gt; and jQuery documentation from jQuery API &lt;a href="http://api.jquery.com/" target="_blank"&gt;website&lt;/a&gt;. &lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Go to &lt;b&gt;&lt;a href="http://dochub.io/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;Instant Documentation&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5016731719216675347?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5016731719216675347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/instant-documentation-for-jquey-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5016731719216675347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5016731719216675347'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/instant-documentation-for-jquey-css.html' title='Instant documentation for jQuey, CSS, HTML and JavaScript'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-y_iGc4B64fo/TvYR8MYDXiI/AAAAAAAABnE/bj4gfONQZ84/s72-c/Documentation.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7284805262011606548</id><published>2011-12-21T09:30:00.000+05:30</published><updated>2011-12-22T21:48:19.997+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>jQuery is() method explained</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
jQuery ".is()" is a filtering method which can be used to check the current element or set of element against a selector, elements, a jquery object or a function. It return true if there is at least one match from the given argument.&lt;br /&gt;
&lt;br /&gt;
Let me put this in simple term with an example.&lt;br /&gt;
&lt;br /&gt;
Suppose you have an unordered list with set of li elements. For example,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;ul&amp;gt;
&amp;lt;li&amp;gt;Chrome&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Firefox&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;IE&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Safari&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;And you have assigned a different CSS based on the popularity of the browser. For example, the font size decreases as per the popularity of the browser. So the new HTML code looks like.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;ul&amp;gt;
&amp;lt;li class="Font22"&amp;gt;Chrome&amp;lt;span&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li class="Font18"&amp;gt;Firefox&amp;lt;/li&amp;gt;
&amp;lt;li class="Font14"&amp;gt;IE&amp;lt;/li&amp;gt;
&amp;lt;li class="Font10"&amp;gt;Safari&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;And css classes are&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;.Font22{
    font-size:22pt;
}
.Font18{
    font-size:18pt;
}
.Font14{
    font-size:14pt;
}
.Font10{
    font-size:10pt;
}
&lt;/pre&gt;Now what do you want to achieve is that when any of the li is clicked, you want to change the background color of the li and based on the clicked li, you want to display a message to the user. &lt;br /&gt;
&lt;br /&gt;
Well, using the .is() method, we can easily check that which li is clicked. As I told earlier, .is() method can check the current element or set of element against a selector, elements, a jquery object or a function. So in below code, we are checking against the selector (css class).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function(){
    $("ul").click(function(event) {
     var $target = $(event.target);
     if ($target.is(".Font22")) {
         $target.css("background-color", "green");
         alert('Chrome is the most popular browser.');
     }
     if ($target.is(".Font18")) {
         $target.css("background-color", "orange");
         alert('Need to work harder to beat Chrome.');
     }
     if ($target.is(".Font14")) {
         $target.css("background-color", "Lightblue");
         alert('Microsoft is loosing the market in browser war.');
     }
     if ($target.is(".Font10")) {
         $target.css("background-color", "red");
         alert('Safari has great fetures but not used by many.');  
     }  
  });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/9du6S/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/9du6S/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;So, I think now you have got the idea about what .is() method does. But there is an issue with .is() method. If you have clearly read first para of this post which says "&lt;b&gt;&lt;i&gt;It return true if there is at least one match from the given argument.&lt;/i&gt;&lt;/b&gt;" So what is does is, it return true if one of the element is matched out of set of elements. To make it clear let's understand with an example. &lt;br /&gt;
&lt;br /&gt;
In this example, we use the last example's HTML only but we want to set the yellow color to li element which has ".Font22" css class. So below is the jQuery code which finds all the li's and assign yellow color to li with ".Font22" css class.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function(){
     var target = $( "li" );
     if (target.is(".Font22")) {
         target.css("background-color", "yellow");
     }   
});
&lt;/pre&gt;So you are hoping that only Chrome li will have the green background but your output will be:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-En5kfCr0VEo/TvCnshzyYoI/AAAAAAAABm4/6PPuNqw90qE/s1600/Is_Output.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="102" src="http://3.bp.blogspot.com/-En5kfCr0VEo/TvCnshzyYoI/AAAAAAAABm4/6PPuNqw90qE/s400/Is_Output.PNG" width="336" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Shocked? Well, nothing to feel weird. That's a behavior of .is() method. It return true if there is at least one match from the given argument. As one li has ".Font22" css class, so it will return true for all the "li" element. If you are working with single node then that is not a problem but with collection of nodes, you could face this issue.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/j6zsf/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/j6zsf/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #38761d;"&gt;The above problem can be easily solved by $("li.Font22") statement but my intention is to explain how .is() method works and not finding out what is the correct way.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You might be wondering why the first example was working. Well, the reason is the in first example the target was a single li element. The code line "var $target = $(event.target);", selects the clicked li element only.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Okay. So now the question is what are the uses of .is()?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I am going to tell you some of the basic, daily useful uses of .is() which I also use quite often.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;You can use it for checking classes, tag types etc.&lt;/li&gt;
&lt;li&gt;It can be also used with jQuery pseudo-selectors. For example, ".is(':hidden')" or ".is(':visible')".&lt;/li&gt;
&lt;li&gt;It can be also used to find out at least one checkbox must be checked out of checkbox list collection.&lt;/li&gt;
&lt;/ul&gt;&lt;pre class="brush:javascript"&gt;var chkboxes = $('input[type="checkbox"]')
if(chkboxes.is(":checked")){
return true;
}
else {
return false;
}
&lt;/pre&gt;As explained earlier about the pratical uses of .is() method, In my opionion, .is() a very handy method. &lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7284805262011606548?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7284805262011606548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-is-method-explained.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7284805262011606548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7284805262011606548'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-is-method-explained.html' title='jQuery is() method explained'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-En5kfCr0VEo/TvCnshzyYoI/AAAAAAAABm4/6PPuNqw90qE/s72-c/Is_Output.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3898130488438017091</id><published>2011-12-20T11:00:00.000+05:30</published><updated>2011-12-20T11:00:00.673+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Validate Date using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
I have already posted about "&lt;a href="http://jquerybyexample.blogspot.com/2011/10/validate-date-format-using-jquery.html" target="_blank"&gt;&lt;b&gt;Validate Date format using jQuery&lt;/b&gt;&lt;/a&gt;" in which explains how to validate the format of date only, not the actual date. I also received one comment from my reader that it is not sufficient to validate only format. So I thought why not writing a post which validates the date as well. So how do we validate the date using jQuery?&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-8qMYgg5NPog/Tu9fhgM5lnI/AAAAAAAABmg/6GfNx-frTOQ/s1600/DateValidation.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-8qMYgg5NPog/Tu9fhgM5lnI/AAAAAAAABmg/6GfNx-frTOQ/s400/DateValidation.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Well, I have created a function which takes date value as input and returns true/false based on date validation logic. Below is the jQuery function which validates the date. The function does following things. Please take a look at the function first.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Checks the value is empty or not.&lt;/li&gt;
&lt;li&gt;It then validates the date against the regular expression defined in the function.&lt;/li&gt;
&lt;li&gt;Then the input date is split into 3 different array for day, month and year.&lt;/li&gt;
&lt;li&gt;Then the each array is checked against validation for example, month is not greater then 12.&lt;/li&gt;
&lt;li&gt;Based on the validation, the function returns true or false.&lt;/li&gt;
&lt;/ul&gt;&lt;pre class="brush:javascript"&gt;function isDate(txtDate)
{
  var currVal = txtDate;
  if(currVal == '')
    return false;
  
  //Declare Regex  
  var rxDatePattern = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/; 
  var dtArray = currVal.match(rxDatePattern); // is format OK?

  if (dtArray == null)
     return false;
 
  //Checks for mm/dd/yyyy format.
  dtMonth = dtArray[1];
  dtDay= dtArray[3];
  dtYear = dtArray[5];

  if (dtMonth &amp;lt; 1 || dtMonth &amp;gt; 12)
      return false;
  else if (dtDay &amp;lt; 1 || dtDay&amp;gt; 31)
      return false;
  else if ((dtMonth==4 || dtMonth==6 || dtMonth==9 || dtMonth==11) &amp;amp;&amp;amp; dtDay ==31)
      return false;
  else if (dtMonth == 2)
  {
     var isleap = (dtYear % 4 == 0 &amp;amp;&amp;amp; (dtYear % 100 != 0 || dtYear % 400 == 0));
     if (dtDay&amp;gt; 29 || (dtDay ==29 &amp;amp;&amp;amp; !isleap))
          return false;
  }
  return true;
}
&lt;/pre&gt;&lt;b&gt;Note&lt;/b&gt;: &lt;i&gt;The above method checks for mm/dd/yyyy format. If you want to validate against the dd/mm/yyyy format then you make the slight change in this function.&lt;/i&gt; Change below code in function to,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;//Checks for mm/dd/yyyy format.
    dtMonth = dtArray[1];
    dtDay= dtArray[3];
    dtYear = dtArray[5];        
&lt;/pre&gt;this code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;//Checks for dd/mm/yyyy format.
    dtDay = dtArray[1];
    dtMonth= dtArray[3];
    dtYear = dtArray[5];   
&lt;/pre&gt;Now, all you need to do is to call this function on button click to validate the date. Below jQuery code shows exactly the same thing.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function() {
    $('#btnSubmit').bind('click', function(){
        var txtVal =  $('#txtDate').val();
        if(isDate(txtVal))
            alert('Valid Date');
        else
            alert('Invalid Date');
    });
});
&lt;/pre&gt;That's it....&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/EywSP/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/EywSP/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3898130488438017091?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3898130488438017091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/validate-date-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3898130488438017091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3898130488438017091'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/validate-date-using-jquery.html' title='Validate Date using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-8qMYgg5NPog/Tu9fhgM5lnI/AAAAAAAABmg/6GfNx-frTOQ/s72-c/DateValidation.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3752823312677535225</id><published>2011-12-20T08:00:00.000+05:30</published><updated>2011-12-20T08:00:01.253+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Download jQuery Performance Tips Cheat Sheet PDF</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;CREDIT &lt;/span&gt;: &lt;a href="http://dumitruglavan.com/"&gt;&lt;span style="color: #660000; font-size: large;"&gt;Dumitru Glavan&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin: auto; overflow: hidden;"&gt;
&lt;iframe frameborder="0" height="5720" scrolling="no" src="http://dumitruglavan.com/?p=99" style="margin-left: -30px; margin-right: -1030px; margin-top: -308px; width: 600px;"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Download &lt;b&gt;&lt;a href="http://dumitruglavan.com/demo/jQuery-Performance-Cheat-Sheet/jQueryPerformanceCheatSheet.pdf" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;PDF&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;a href="http://dumitruglavan.com/?p=99"&gt;&lt;span style="color: #0b5394;"&gt;ORIGINAL article&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3752823312677535225?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3752823312677535225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-performance-tips-cheat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3752823312677535225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3752823312677535225'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-performance-tips-cheat.html' title='Download jQuery Performance Tips Cheat Sheet PDF'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-9154602295501217455</id><published>2011-12-19T12:00:00.000+05:30</published><updated>2011-12-19T12:00:02.032+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>What is jQuery?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
Today I got a question from one of my colleague who is a fresher and doesn't know what is jQuery. So he came to me and asked me &lt;b&gt;what is jQuery and why should we use jQuery&lt;/b&gt;? So I have explain it to him and thought of writing a post as well about what is jQuery and why one should use it?&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-O0g3FgNcfVk/Tu4LrN1hkuI/AAAAAAAABmA/TUp9d3prLMo/s1600/question-mark.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/-O0g3FgNcfVk/Tu4LrN1hkuI/AAAAAAAABmA/TUp9d3prLMo/s200/question-mark.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;b&gt;What is jQuery?&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
jQuery is a library written on top of the JavaScript. So it is a JavaScript library. jQuery is amazing library for the JavaScript programmers, which makes web development a piece of cake. jQuery helps the programmers to keep code simple and concise. The biggest advantage of jQuery is that jQuery library is designed to keep the things very simple and reusable. Motto is jQuery library is "&lt;b&gt;Writing Javascript code should be fun.&lt;/b&gt;"&lt;br /&gt;
&lt;br /&gt;
jQuery library simplifies the interaction process or access process of traversing in HTML document. It provides methods to make animations, add ajax interaction to the page, provides an easy way to apply CSS to any items and provides an easy mechanism for binding and unbinding events. Length JavaScript code can easily replaced by few lines of code in jQuery.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-FC41ytBtu7k/Tu4PsczvlFI/AAAAAAAABmI/IjkmynLMSn4/s1600/Why.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-FC41ytBtu7k/Tu4PsczvlFI/AAAAAAAABmI/IjkmynLMSn4/s1600/Why.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;b&gt;Why to use jQuery&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
A question came that when all the things can be achieved using JavaScript then why to go for jQuery? Well the answer is that The jQuery library is has many easy to use functions and methods to make rich applications. And believe me  these functions are fairly easy to learn and even it is not difficult for designers or freshers to learn. Due to it's simplicity, jQuery is pretty easy to learn and easy to write. jQuery is a client side language so it can be easily used with ASP.NET,PHP,JSP and Servlets.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;Features of jQuery&lt;/b&gt;&lt;/h3&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Allows to access elements in the document: If one need to access the DOM tree without any JavaScript libarary, one has to write many lines of code. jQuery provides a selector mechanism to access any part of DOM.&lt;/li&gt;
&lt;li&gt;Easily apply CSS: As it’s known that CSS is the most powerful and mostly used for good appreance of any webpage. jQuery provides CSS Selectors which allows to change the CSS classes or individual style for any portion of the document. This can be done even after the page is rendered.&lt;/li&gt;
&lt;li&gt;Make Animation: For better user experience, animation can do the job for you. jQuery provides many methods to perform animations like show,hide, fade, wipe, start, stop etc. Doing all this with jQuery is fun as No huge lines of code, no complex logic.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Ajax Interaction: In today’s world, Ajax is one of the most popular technology used in almost every website for better user experience. jQuery provides support for ajax also which allows to access server side event without refreshing the web page.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;API to change document’s content: jQuery provides API (Application Program Interface) which allows to change the content of the document. Changing Text, inserting images, ordering of list can be done with few keystrokes with jQuery API. Entire structure of HTML can be rewritten or extended.&lt;/li&gt;
&lt;li&gt;Event handling: Any technology is a failure if it cannot responsed to the user when any event takes place. Event handling is one the decent feature of jQuery. It quickly responsed to any event such as user clicking a button.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ArK9SkTWrTI/Tu4RJnTADmI/AAAAAAAABmQ/x_v0UZ1Lv6I/s1600/download-icon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://4.bp.blogspot.com/-ArK9SkTWrTI/Tu4RJnTADmI/AAAAAAAABmQ/x_v0UZ1Lv6I/s200/download-icon.jpg" width="160" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Where to download jQuery from&lt;/h3&gt;
&lt;br /&gt;
jQuery file can be downloaded from jQuery Official website &lt;a href="http://www.jquery.com/"&gt;http://www.jquery.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;jQuery Versions&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
jQuery library comes in 2 forms:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;The uncompressed .js file is easy to read and modify, but it's around 190kb in size (at the time of writing).&lt;/li&gt;
&lt;li&gt;The minified .js file has all comments, whitespace, and other unnecessary characters removed from the file, squeezing the whole library into a mere 23kb. Although you can't easily read the code, this is the version you'll want to place on your site, as it's much quicker for visitors to download.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;When this post is written, the latest version of jQuery is released is 1.7.1&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
So what are you waiting for..start learning jQuery and have fun... Some of my previous series of articles will help you to learn jQuery. &lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%20For%20Beginners"&gt;&lt;b&gt;jQuery Beginner Series&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%20Interview%20Question"&gt;&lt;b&gt;jQuery Interview Questions&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%20Tips"&gt;&lt;b&gt;jQuery Tips and Tricks&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/search/label/Jquery%20Code%20Snippets"&gt;&lt;b&gt;jQuery Code Examples&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/search/label/Cheat%20Sheets"&gt;&lt;b&gt;jQuery Cheat Sheets&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%20Books"&gt;&lt;b&gt;jQuery Books&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-9154602295501217455?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/9154602295501217455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/what-is-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9154602295501217455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9154602295501217455'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/what-is-jquery.html' title='What is jQuery?'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-O0g3FgNcfVk/Tu4LrN1hkuI/AAAAAAAABmA/TUp9d3prLMo/s72-c/question-mark.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5833324250538465646</id><published>2011-12-19T08:00:00.000+05:30</published><updated>2011-12-19T20:12:50.839+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Top and Best jQuery tips and tricks</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-VS7-uaQa-eU/Tu2zow18TxI/AAAAAAAABl0/XhMgdT5kYhg/s1600/MostWanted.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://2.bp.blogspot.com/-VS7-uaQa-eU/Tu2zow18TxI/AAAAAAAABl0/XhMgdT5kYhg/s200/MostWanted.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="text-align: justify;"&gt;jQuery has already become very popular and it is a must for every web developer. But with it's popularity, it is pretty important for any developer to use it efficiently and intelligently. It is important to know some tips and tricks as they save most important part of any software, that is human effort.&amp;nbsp;&lt;/span&gt;&lt;span style="text-align: justify;"&gt;In this post, I will be discussing some of the jQuery tips and tricks out of my own collection.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following is my collection of jQuery tips and trick.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-always-load-your-jquery.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Always load your jQuery framework from CDN&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-shorthand-for-documentready.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Shorthand for $(document).ready()&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/how-to-load-jquery-locally-when-cdn.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;How to load jQuery locally when CDN fails&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/11/tips-to-use-jquery-selectors.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Use jQuery selectors effieciently&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-how-to-get-mouse-cursor.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;How to get mouse cursor position&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-disable-right-click-using-jquery.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Disable right click using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/find-which-mouse-button-clicked-using.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Find which mouse button clicked using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/how-to-find-index-of-selected-element.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;How to find index of Selected element&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-how-to-check-if-element-is.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;How to check if element is empty&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/how-to-create-clone-of-any-object-using.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Create clone of any object using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-how-to-detect-browsers.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Detect Browsers using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/make-readonly-textbox-using-jquery.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Make readonly textbox using Jquery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/11/disable-enter-key-on-page-using-jquery.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Disable "Enter" key on page using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-first-textbox-of.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Set focus on First textbox of page using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-next-textbox-on.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Set focus on next textbox on Enter Key using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/code-to-allow-only-numbers-in-textbox.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Allow only numbers in textbox&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/12/disable-cut-copy-and-paste-function-for.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Disable Cut, Copy and Paste function for textbox using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/02/how-to-zoom-image-on-mouse-over-using.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Zoom image on mouseover using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/difference-between-this-and-this-in.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Difference between $(this) and 'this' in jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/10/jquery-code-to-disable-enable-all.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Disable-Enable all controls of page using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/validate-email-address-using-jquery.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Validate email address using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/bind-vs-live-vs-delegate-function.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;bind() vs live() vs delegate() function&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/11/avoid-jquerypost-use-jqueryajax.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Avoid jQuery.Post(), use jQuery.ajax()&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-disable-jquery-animation.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Disable jQuery animation&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/how-to-keep-your-jquery-code-clean.html"&gt;&lt;b&gt;&lt;span style="color: #660000;"&gt;Keep your jQuery code clean&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5833324250538465646?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5833324250538465646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/best-jquery-tips-and-tricks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5833324250538465646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5833324250538465646'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/best-jquery-tips-and-tricks.html' title='Top and Best jQuery tips and tricks'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-VS7-uaQa-eU/Tu2zow18TxI/AAAAAAAABl0/XhMgdT5kYhg/s72-c/MostWanted.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7831324462498301602</id><published>2011-12-13T08:00:00.000+05:30</published><updated>2011-12-13T08:00:01.717+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Download jQuery Novice to Ninja ebook</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
jQuery: Novice to Ninja is a compilation of best-practice jQuery solutions to meet the most challenging JavaScript problems. In this question-and-answer book on jQuery, you’ll find a cookbook of ready-to-go solutions to help breathe life into your web page.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-_TKpuMYlrUQ/TuSSqOv0GOI/AAAAAAAABls/3_XnRRkhbWI/s1600/Novice.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-_TKpuMYlrUQ/TuSSqOv0GOI/AAAAAAAABls/3_XnRRkhbWI/s320/Novice.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Topics covered include:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Scrolling, Resizing and Animating Webpage elements&lt;/li&gt;
&lt;li&gt;Backgrounds, Slideshows, and Crossfaders&lt;/li&gt;
&lt;li&gt;Menus, Tabs, and Panels&lt;/li&gt;
&lt;li&gt;Buttons, Fields, and Controls&lt;/li&gt;
&lt;li&gt;Lists, Trees, and Tables&lt;/li&gt;
&lt;li&gt;Frames, Windows, and Dialogs&lt;/li&gt;
&lt;li&gt;Adding interactivity with Ajax&lt;/li&gt;
&lt;li&gt;Using the jQuery User Interface Themeroller&lt;/li&gt;
&lt;li&gt;Writing your own jQuery plug-ins&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/book/jquery-novice-to-ninja/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;
&lt;b&gt;Credit &lt;/b&gt;: &lt;a href="http://www.wowebook.pro/book/jquery-novice-to-ninja/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7831324462498301602?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7831324462498301602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-novice-to-ninja-ebook.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7831324462498301602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7831324462498301602'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-novice-to-ninja-ebook.html' title='Download jQuery Novice to Ninja ebook'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-_TKpuMYlrUQ/TuSSqOv0GOI/AAAAAAAABls/3_XnRRkhbWI/s72-c/Novice.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3297732928946181858</id><published>2011-12-12T10:30:00.000+05:30</published><updated>2012-02-06T17:49:52.686+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery YouTube'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Set Youtube video as background using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
The title sounds interesting? Isn't it? Have a &lt;b&gt;Youtube&lt;/b&gt; video as your page background using &lt;b&gt;jQuery&lt;/b&gt;? Well having a &lt;b&gt;Youtube&lt;/b&gt; video as background may be disturbing as if speed is not good then the user experience will not be good. But let's not discuss the pros and cons of having &lt;b&gt;Youtube&lt;/b&gt; video as background. That is left to you. You decide?&lt;br /&gt;
&lt;br /&gt;
Okay. So now lets go to the point on how to set the &lt;b&gt;Youtube&lt;/b&gt; video as background. Well, that is possible using a &lt;b&gt;jQuery&lt;/b&gt; plugin called "&lt;b&gt;jQuery tubular&lt;/b&gt;". jQuery tubular is a plugin that places a YouTube video of your choice into your page as a background.&lt;br /&gt;
&lt;br /&gt;
Usage is pretty simple and easy. And requires JavaScript and the Flash player to be installed and functional on the client's browser. tubular is dependent on jQuery and swfobject. You will need to know the YouTube ID of the video you want to use as well as the container DIV of your web page.&lt;br /&gt;
&lt;br /&gt;
Please note, tubular must be deployed on a web server to function. The YouTube player will not work when loaded into your browser from your machine.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Load the jQuery&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script type="text/javascript" 
src="http://code.jquery.com/jquery-1.7.1.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;b&gt;Load the SWF object&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;b&gt;Load the jQuery tubular plugin&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script type="text/javascript"src="js/jquery.tubular.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;b&gt;Call tubular on your BODY tag with the YouTube ID and your content container DIV as parameters. This must be performed within your $(document).ready() function.&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$().ready(function() {
  $('body').tubular('someYTVideoId','dvVideoID'); 
//someYTVideoId is the YouTube ID and dvVideoID is your containing DIV.
 });
&lt;/pre&gt;That's it! tubular does the rest.&lt;br /&gt;
&lt;br /&gt;
Please note that tubular will change the structure of your CSS. Your wrapper DIV will become position: relative and z-index: 99. The z-index value will be configurable in future versions. Two DIVS, yt-container and video-cover will be created at z-index: 1 and 2 respectively with position: fixed for the video and an empty DIV above it to prevent accidental clickthroughs to YouTube.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://www.seanmccambridge.com/tubular" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;span style="color: red;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;and Download &lt;b&gt;&lt;a href="http://code.google.com/p/jquery-tubular/downloads/list" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Plugin&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3297732928946181858?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3297732928946181858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/set-youtube-video-as-background-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3297732928946181858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3297732928946181858'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/set-youtube-video-as-background-using.html' title='Set Youtube video as background using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-736815596382683761</id><published>2011-12-12T08:00:00.000+05:30</published><updated>2011-12-12T08:00:00.281+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery timepicker plugin demo</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was thinking about creating a jQuery timepicker plugin but someone has already put lots of hard work to create a timepicker plugin. I suggest you to see the below demo for timepicker plugin.&lt;br /&gt;
&lt;iframe allowtransparency="true" frameborder="0" height="1520" scrolling="no" src="http://jonthornton.github.com/jquery-timepicker/" style="margin-left: -20px;" width="100%"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Download&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
You can download this project in either &lt;a href="https://github.com/jonthornton/jquery.timepicker/zipball/master" rel="nofollow" target="_blank"&gt;zip&lt;/a&gt; or &lt;a href="https://github.com/jonthornton/jquery.timepicker/tarball/master" rel="nofollow" target="_blank"&gt;tar formats&lt;/a&gt;. &lt;br /&gt;
Get the source code on GitHub: &lt;a href="https://github.com/jonthornton/jquery-timepicker" rel="nofollow" target="_blank"&gt;jonthornton/jquery.timepicker&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-736815596382683761?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/736815596382683761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-timepicker-plugin-demo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/736815596382683761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/736815596382683761'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-timepicker-plugin-demo.html' title='jQuery timepicker plugin demo'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6373461602498725706</id><published>2011-12-07T10:42:00.001+05:30</published><updated>2011-12-07T18:10:06.212+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Download jQuery 1.7 Visual Cheat pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Few days back jQuery 1.7 was released and ready for the consumption. Read my articles to find out,  &lt;a href="http://jquerybyexample.blogspot.com/2011/11/whats-new-in-jquery-17.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What's new in jQuery 1.7&lt;/span&gt;&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Also read how to use &lt;a href="http://jquerybyexample.blogspot.com/2011/11/jqueryisnumeric-in-jquery-17.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;jQuery.isNumeric&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; introduced with jQuery 1.7.&lt;br /&gt;
&lt;br /&gt;
Here is a download link to download the cheat sheet for jQuery 1.7.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 22px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;a href="http://woorkup.com/wp-content/uploads/2011/12/jQuery-17-Visual-Cheat-Sheet.pdf"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;Download PDF&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;Credit&lt;br /&gt;
&lt;a href="http://woorkup.com/2011/12/05/jquery-1-7-visual-cheat-sheet/"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;woorkup&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6373461602498725706?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6373461602498725706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-17-visual-cheat-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6373461602498725706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6373461602498725706'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-17-visual-cheat-pdf.html' title='Download jQuery 1.7 Visual Cheat pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8150122101837728044</id><published>2011-12-07T08:00:00.000+05:30</published><updated>2011-12-07T08:00:01.791+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Auto save the form using jQuery and HTML 5</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
Just imagine that you're filling a long form on any site And when you're almost done with that browser is crashed, or you closed browser accidently, or electricity is turned off, or something else break your efforts. How would you feel? Horrible? You would be getting angry as all your inputs are gone. You would be thinking if there was a way to recover your data which you just filled.&lt;br /&gt;
&lt;br /&gt;
There is another scneario which I think you all have noticed if you are using gmail. When you typing your email, your email gets saved automatically in drafts folder without pressing any button. Well, having a system like Gmail will not be as easy but there is a way to recover your data which you have filled in the form. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #351c75; font-size: large;"&gt;The solution is Sisyphus.js&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This small js file stores the data to the local storage of the browser and restores it when the user reloads or reopens the page or opens the page in a new tab. The data is cleared from local storage when the user submits or resets the form. It is using the HTML 5 features called localStorage. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #990000;"&gt;What is localStorage object&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Data stored using the localStorage object is persisted until it is specifically removed via JavaScript or the user clears the browser’s cache. Data stored in the localStorage object is accessible only from the domain that initially stored the data.&lt;br /&gt;
&lt;br /&gt;
Integrating sisyphus with your website is pretty simple. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;If you want to protect specific form&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#form1, #form2').sisyphus();&lt;/pre&gt;&lt;b&gt;If you want to protect all the forms in your page&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('form').sisyphus();&lt;/pre&gt;Following options are available and also customizable.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;{
  customKeyPrefix: '',
  timeout: 0,
  onSave: function() {},
  onRestore: function() {},
  onRelease: function() {},
  excludeFields: null
 }
&lt;/pre&gt;&lt;b&gt;customKeyPrefix&lt;/b&gt; is an addition to key in Local Storage to store form fields values&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;timeout&lt;/b&gt; is an interval in seconds to perform saving data. If 0 - save every time field is updated.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;onSave&lt;/b&gt; is function fired each time data are saved to Local Storage&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;onRestore&lt;/b&gt; is function fired if form's data are restored from Local Storage. Unlike onSaveCallback it's common for whole form, not for each field&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;onRelease&lt;/b&gt; is function fired when Local Storage is freed of previously stored form data&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;excludeFields&lt;/b&gt; is selector to exclude specified fields from observing, ex: $( "textarea, :text" )&lt;br /&gt;
&lt;br /&gt;
For example, following code will force Sisyphus to save each text field value every 5 seconds:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('form').sisyphus({timeout: 5});&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Requirements&lt;/b&gt;: Sisyphus.js requires jQuery version 1.2 or higher.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Browser support&lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Chrome 4+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Opera 10.5+&lt;/li&gt;
&lt;li&gt;Safari 4+&lt;/li&gt;
&lt;li&gt;IE 8+&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Note&lt;/b&gt;: That it doesn't share the information across the browser as it stores in local storage of the particular browser. For example, you were visiting the site in Chrome and after filling some information the browser gets crashed. Now if you open the same site in chrome then you will find your data but if you open it in IE or mozilla then you will not find your data.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;&lt;a href="http://simsalabim.github.com/sisyphus/" target="_blank"&gt;Demo&lt;/a&gt;&amp;nbsp;and &lt;a href="https://github.com/simsalabim/sisyphus"&gt;Download the plugin&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8150122101837728044?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8150122101837728044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/auto-save-form-using-jquery-and-html-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8150122101837728044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8150122101837728044'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/auto-save-form-using-jquery-and-html-5.html' title='Auto save the form using jQuery and HTML 5'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4444858826313045170</id><published>2011-12-06T08:00:00.000+05:30</published><updated>2011-12-11T16:51:00.846+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Download Applied jQuery: Develop and Design ebook</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Applied jQuery teaches readers how to quickly start writing application interfaces. The beautifully designed book offers practical techniques and provides lots of real-world advice and guidance. The Author, Jay Blanchard, has practical experience working in the field and wastes no time getting to the instruction, taking the reader from a beginner to a proficient interface programmer by the end of the book.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-coAsREKyL_w/TtuRx2lvboI/AAAAAAAABlk/7XqqtHY1Aac/s1600/Applied-jQuery.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-coAsREKyL_w/TtuRx2lvboI/AAAAAAAABlk/7XqqtHY1Aac/s1600/Applied-jQuery.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Today’s Web developers are are expected to be well versed in many different technologies. While it is good to have a shelf full of books that focus on single technologies, having a book that shows developers how to combine these technologies is key. This book takes the reader beyond the fundamental mechanics of individual technologies to illustrate the value and power of combining jQuery and PHP with templates and layouts handled by HTML and CSS. Beginning to intermediate web developers designing and developing web application interfaces and web sites will learn how to blend these ingredient technologies, as well as how to secure jQuery.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Table of Contents&lt;/b&gt;&lt;br /&gt;
Chapter 1. Introducing jQuery&lt;br /&gt;
Chapter 2. Working with Events&lt;br /&gt;
Chapter 3. Making Forms Pop&lt;br /&gt;
Chapter 4. Being Effective with AJAX&lt;br /&gt;
Chapter 5. Applying jQuery Widgets&lt;br /&gt;
Chapter 6. Creating Application Interfaces&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/book/applied-jquery/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;
&lt;b&gt;Credit &lt;/b&gt;: &lt;a href="http://www.wowebook.pro/book/applied-jquery/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4444858826313045170?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4444858826313045170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-applied-jquery-develop-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4444858826313045170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4444858826313045170'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-applied-jquery-develop-and.html' title='Download Applied jQuery: Develop and Design ebook'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-coAsREKyL_w/TtuRx2lvboI/AAAAAAAABlk/7XqqtHY1Aac/s72-c/Applied-jQuery.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6734247161566902063</id><published>2011-12-05T08:00:00.000+05:30</published><updated>2011-12-05T08:00:00.441+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>jQuery plugin for Uppercase, lowercase, title case and pascal case</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
In one of my &lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-code-convert-string-value-to.html"&gt;&lt;b&gt;post&lt;/b&gt;&lt;/a&gt;, I have explained how to convert text to UpperCase using jQuery. But today, I have created my first plugin called "Setcase". The beauty of this plugin is that this plugin can be used to convert text to uppercase, lowercase, title case and pascal case. It starts converting text to case as soon as user starts typing. This plugin is very simple plugin and it makes use of some of the jQuery/javascript methods to convert the text. &lt;br /&gt;
&lt;br /&gt;
First check out the demo.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe height="250" src="http://jsbin.com/ulaluc/edit#preview" width="400"&gt;&amp;amp;amp;lt;p&amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt; &amp;amp;amp;lt;/p&amp;amp;amp;gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
To use this plugin, first you need to reference jQuery.js file and also add reference of Setcase.js plugin.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script type="text/javascript"
src="https://sites.google.com/site/jquerybyexample/SetCase.js"&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;This plugin can be used for textbox and you need to set the case which you want to implement on textbox. All you need to do is to set "caseValue" property value to one of the following value.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;upper&lt;/li&gt;
&lt;li&gt;lower&lt;/li&gt;
&lt;li&gt;title&lt;/li&gt;
&lt;li&gt;pascal&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&lt;b&gt;Note&lt;/b&gt;: All the values are in lower case.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Upper case:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function() {
    $("#txtUpper").Setcase({caseValue : 'upper'});
});
&lt;/pre&gt;&lt;b&gt;Lower case:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function() {
    $("#txtLower").Setcase({caseValue : 'lower'});
});
&lt;/pre&gt;&lt;b&gt;Title case:&lt;/b&gt; First letter of entered text is capital and rest are in lower case.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function() {
    $("#txtTitle").Setcase({caseValue : 'title'});
});
&lt;/pre&gt;&lt;b&gt;Pascal case:&lt;/b&gt; Every first letter of the word is set to capital.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function() {
    $("#txtPascal").Setcase({caseValue : 'pascal'});
});
&lt;/pre&gt;Below is the code for plugin. This plugin takes advantage of keypress and blur method on the textbox.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;(function($) {
  //Create plugin named Setcase
 $.fn.Setcase = function(settings) {
        // Defaults
  var config = {
   caseValue: 'Upper'
  };
  
  //Merge settings
  if(settings) $.extend(config, settings);
  
 this.each(function() {
        //keypress event
     $(this).keypress(function(){
      if(config.caseValue == "upper")
   {
    var currVal = $(this).val();
    $(this).val(currVal.toUpperCase());
   }
   else if(config.caseValue == "lower")
   {
    var currVal = $(this).val();
    $(this).val(currVal.toLowerCase());
   }
   else if(config.caseValue == "title")
   {
       var currVal = $(this).val();
    $(this).val(currVal.charAt(0).toUpperCase() + currVal.slice(1).toLowerCase());
   }
   else if(config.caseValue == "pascal")
   {
       var currVal = $(this).val();
    currVal = currVal.toLowerCase().replace(/\b[a-z]/g, function(txtVal) {
     return txtVal.toUpperCase();
    });
    $(this).val(currVal);
   }
        });
        //blur event  
     $(this).blur(function(){
       if(config.caseValue == "upper")
   {
    var currVal = $(this).val();
    $(this).val(currVal.toUpperCase());
   }
   else if(config.caseValue == "lower")
   {
    var currVal = $(this).val();
    $(this).val(currVal.toLowerCase());
   }
   else if(config.caseValue == "title")
   {
       var currVal = $(this).val();
    $(this).val(currVal.charAt(0).toUpperCase() + currVal.slice(1).toLowerCase());
   }
   else if(config.caseValue == "pascal")
   {
       var currVal = $(this).val();
    currVal = currVal.toLowerCase().replace(/\b[a-z]/g, function(txtVal) {
     return txtVal.toUpperCase();
    });
    $(this).val(currVal);
   }
     });
 });
 };
})(jQuery);
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsbin.com/ulaluc/edit#preview" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsbin.com/ulaluc/edit#source" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.&lt;/div&gt;You can also download the plugin from below link.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;a href="https://sites.google.com/site/jquerybyexample/SetCase.js" target="_blank"&gt;&lt;span style="color: #990000;"&gt;Download Plugin&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;This is the first plugin which I have created. I hope you liked it and find it pretty useful.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6734247161566902063?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6734247161566902063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-plugin-for-uppercase-lowercase.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6734247161566902063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6734247161566902063'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-plugin-for-uppercase-lowercase.html' title='jQuery plugin for Uppercase, lowercase, title case and pascal case'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3992750677299621298</id><published>2011-12-02T10:30:00.000+05:30</published><updated>2011-12-04T15:05:04.829+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>A Quick Guide to jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was thinking to write a quick guide for jQuery for all my readers and I have also started working on that. But today while googling I came accross a link which already have this jQuery quick guide. And I must admit he has done a great job while preparing this neat and easy guide. All the things which are required for quick guide is placed at one location. Like,&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;jQuery selectors&lt;/li&gt;
&lt;li&gt;jQuery - DOM Attributes&lt;/li&gt;
&lt;li&gt;jQuery - DOM Traversing&lt;/li&gt;
&lt;li&gt;jQuery - CSS Methods&lt;/li&gt;
&lt;li&gt;jQuery - DOM Manipulation Methods&lt;/li&gt;
&lt;li&gt;jQuery - Events Handling&lt;/li&gt;
&lt;li&gt;jQuery - AJAX&lt;/li&gt;
&lt;li&gt;jQuery - Effects&lt;/li&gt;
&lt;li&gt;UI Library Based Effects&lt;/li&gt;
&lt;/ul&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Click &lt;b&gt;&lt;a href="http://www.tutorialspoint.com/jquery/jquery-quick-guide.htm" rel="nofollow" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; to visit this fabulous jQuery quick guide. &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3992750677299621298?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3992750677299621298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/quick-guide-to-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3992750677299621298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3992750677299621298'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/quick-guide-to-jquery.html' title='A Quick Guide to jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4876016366895631379</id><published>2011-12-02T07:47:00.000+05:30</published><updated>2011-12-11T16:51:00.853+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Download Learning jQuery 3rd edition ebook pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
To build interesting, interactive sites, developers are turning to JavaScript libraries such as jQuery to automate common tasks and simplify complicated ones. Because many web developers have more experience with HTML and CSS than with JavaScript, the library’s design lends itself to a quick start for designers with little programming experience. Experienced programmers will also be aided by its conceptual consistency.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-TuQ7ZUcAR1s/TtcGVT1EHNI/AAAAAAAABlc/48dDy87xGHo/s1600/LearningjQuery.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-TuQ7ZUcAR1s/TtcGVT1EHNI/AAAAAAAABlc/48dDy87xGHo/s1600/LearningjQuery.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Learning jQuery Third Edition is revised and updated for version 1.6 of jQuery. You will learn the basics of jQuery for adding interactions and animations to your pages. Even if previous attempts at writing JavaScript have left you baffled, this book will guide you past the pitfalls associated with AJAX, events, effects, and advanced JavaScript language features.&lt;br /&gt;
&lt;br /&gt;
Starting with an introduction to jQuery, you will first be shown how to write a functioning jQuery program in just three lines of code. Learn how to add impact to your actions through a set of simple visual effects and to create, copy, reassemble, and embellish content using jQuery’s DOM modification methods. The book will step you through many detailed, real-world examples, and even equip you to extend the jQuery library itself with your own plug-ins.&lt;br /&gt;
&lt;br /&gt;
What you will learn from this book :&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Create interactive elements for your web designs&lt;/li&gt;
&lt;li&gt;Learn how to create the best user interface for your web applications&lt;/li&gt;
&lt;li&gt;Use selectors in a variety of ways to get anything you want from a page&lt;/li&gt;
&lt;li&gt;Make things happen on your webpages with events&lt;/li&gt;
&lt;li&gt;Add flair to your actions with a variety of animation effects&lt;/li&gt;
&lt;li&gt;Discover the new features available in jQuery 1.6 in this third update of this popular jQuery book&lt;/li&gt;
&lt;/ul&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/book/learning-jquery-3rd-edition/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;Credit : &lt;a href="http://www.wowebook.pro/book/learning-jquery-3rd-edition/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4876016366895631379?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4876016366895631379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-learning-jquery-3rd-edition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4876016366895631379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4876016366895631379'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-learning-jquery-3rd-edition.html' title='Download Learning jQuery 3rd edition ebook pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-TuQ7ZUcAR1s/TtcGVT1EHNI/AAAAAAAABlc/48dDy87xGHo/s72-c/LearningjQuery.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5760790492245969243</id><published>2011-12-01T12:00:00.000+05:30</published><updated>2011-12-01T12:00:00.501+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery Mobile Cheat Sheet</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
I found a link for jQuery mobile cheat sheet but unfortunately available cheat sheet available for jQuery mobile is not downloadable. As there is no pdf version available for the same. But however you can the website to go through this nice and cool jQuery mobile cheat sheet.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://brooky.cc/2011/04/23/jquery-mobile-cheat-sheet/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="365" src="http://3.bp.blogspot.com/-y6wTBof3EhI/TtZADGGe5mI/AAAAAAAABlU/7CDDkNzKvFk/s400/jQuery+Mobile.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Source :&amp;nbsp;&lt;a href="http://brooky.cc/2011/04/23/jquery-mobile-cheat-sheet/"&gt;&lt;b&gt;brooky's blog&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5760790492245969243?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5760790492245969243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-mobile-cheat-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5760790492245969243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5760790492245969243'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/jquery-mobile-cheat-sheet.html' title='jQuery Mobile Cheat Sheet'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-y6wTBof3EhI/TtZADGGe5mI/AAAAAAAABlU/7CDDkNzKvFk/s72-c/jQuery+Mobile.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8486247393326537613</id><published>2011-12-01T09:00:00.000+05:30</published><updated>2011-12-11T16:51:00.865+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download jQuery Pocket Reference ebook pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/--EigEw5D0X4/TtY-wTj_eZI/AAAAAAAABlM/k-X8Ytig2I0/s1600/Pocket+Reference.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/--EigEw5D0X4/TtY-wTj_eZI/AAAAAAAABlM/k-X8Ytig2I0/s1600/Pocket+Reference.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
“As someone who uses jQuery on a regular basis, it was surprising to discover how much of the library I’m not using. This book is indispensable for anyone who is serious about using jQuery for non-trivial applications.” — Raffaele Cecco, longtime developer of video games, including Cybernoid, Exolon, and Stormlord&lt;br /&gt;
&lt;br /&gt;
jQuery is the “write less, do more” JavaScript library. Its powerful features and ease of use have made it the most popular client-side JavaScript framework for the Web. This book is jQuery’s trusty companion: the definitive “read less, learn more” guide to the library.&lt;br /&gt;
&lt;br /&gt;
jQuery Pocket Reference explains everything you need to know about jQuery, completely and comprehensively. You’ll learn how to:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;Select and manipulate document elements&lt;/li&gt;
&lt;li&gt;Alter document structure&lt;/li&gt;
&lt;li&gt;Handle and trigger events&lt;/li&gt;
&lt;li&gt;Create visual effects and animations&lt;/li&gt;
&lt;li&gt;Script HTTP with Ajax utilities&lt;/li&gt;
&lt;li&gt;Use jQuery’s selectors and selection methods, utilities, plugins and more&lt;/li&gt;
&lt;/ul&gt;The 25-page quick reference summarizes the library, listing all jQuery methods and functions, with signatures and descriptions.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/book/jquery-pocket-reference/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;Credit : &lt;a href="http://www.wowebook.pro/book/jquery-pocket-reference/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8486247393326537613?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8486247393326537613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-pocket-reference-ebook.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8486247393326537613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8486247393326537613'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/12/download-jquery-pocket-reference-ebook.html' title='Download jQuery Pocket Reference ebook pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/--EigEw5D0X4/TtY-wTj_eZI/AAAAAAAABlM/k-X8Ytig2I0/s72-c/Pocket+Reference.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8645567156109219198</id><published>2011-11-30T10:00:00.000+05:30</published><updated>2011-12-11T16:51:00.873+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download jQuery mobile ebook pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Native apps have distinct advantages, but the future belongs to mobile web apps that function on a broad range of smartphones and tablets. Get started with jQuery Mobile, the touch-optimized framework for creating apps that look and behave consistently across many devices. This concise book provides HTML5, CSS3, and JavaScript code examples, screen shots, and step-by-step guidance to help you build a complete working app with jQuery Mobile.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-U6NRpBNQi4A/TtY8M55KVaI/AAAAAAAABk0/g4tEKypQxLw/s1600/184585962.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/-U6NRpBNQi4A/TtY8M55KVaI/AAAAAAAABk0/g4tEKypQxLw/s200/184585962.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If you’re already familiar with the jQuery JavaScript library, you can use your existing skills to build cross-platform mobile web apps right now. This book shows you how.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Get a high-level overview of jQuery Mobile: how it works and how to use it&lt;/li&gt;
&lt;li&gt;Learn about paging and navigation, including dialogs, Ajax content, and history&lt;/li&gt;
&lt;li&gt;Employ jQuery Mobile’s extensive event system to create rich interactions&lt;/li&gt;
&lt;li&gt;Work with toolbars, buttons, lists, forms, and other UI elements&lt;/li&gt;
&lt;li&gt;Create a variety of visual designs with jQuery Mobile’s sophisticated theming system&lt;/li&gt;
&lt;li&gt;Use the jQuery Mobile API for finer control over elements and interactions&lt;/li&gt;
&lt;li&gt;Put everything together and build a mobile app from start to finish&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/book/jquery-mobile/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;
Credit : &lt;a href="http://www.wowebook.pro/book/jquery-mobile/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8645567156109219198?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8645567156109219198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/download-jquery-mobile-ebook-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8645567156109219198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8645567156109219198'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/download-jquery-mobile-ebook-pdf.html' title='Download jQuery mobile ebook pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-U6NRpBNQi4A/TtY8M55KVaI/AAAAAAAABk0/g4tEKypQxLw/s72-c/184585962.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-600052270533627201</id><published>2011-11-30T09:30:00.001+05:30</published><updated>2011-11-30T09:30:00.834+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>Avoid jQuery.Post(), use jQuery.ajax()</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Well, as you are aware that there are many ways to make an ajax call. If you don't know then do read "&lt;a href="http://jquerybyexample.blogspot.com/2010/09/how-to-make-jquery-ajax-calls.html" target="_blank"&gt;&lt;b&gt;How to Make jQuery AJAX calls&lt;/b&gt;&lt;/a&gt;". Okay, hope you have gone through the article. So 2 very common ways are jQuery.Post() and jQuery.get().jQuery post() is for to make a post request and jQuery get() is to make a get request. That's the only difference between jQuery Post() and jQuery get().&lt;br /&gt;
&lt;br /&gt;
These methods are very popular for ajax call because they are simple to write and easy to remember the syntax as well. But you are making a mistake over here. By using jQuery post()/ jQuery get(), you always trust the response from the server and you believe it is going to be successful all the time. Well, it is certainly not a good idea to trust the response. As there can be n number of reason which may lead to failure of response. Okay, why do I say this? Let's take a look at the signature of jQuery post().&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$.post({
  url: url,
  data: data,
  success: success,
  dataType: dataType
});
&lt;/pre&gt;&lt;br /&gt;
The parameters are,&lt;br /&gt;
&lt;b&gt;url (String)&lt;/b&gt;: The URL of the page to load.&lt;br /&gt;
&lt;b&gt;data (Map)&lt;/b&gt;: Key/value pairs that will be sent to the server.&lt;br /&gt;
&lt;b&gt;success (Function)&lt;/b&gt;: A callback function that is executed if the request succeeds.&lt;br /&gt;
&lt;b&gt;dataType&lt;/b&gt;: The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).&lt;br /&gt;
&lt;br /&gt;
Looking at above parameters, there only a single callback function that will be executed when the request is complete (and only if the response has a successful response code). What if your request fails? There is no error handling. oh... So what should be done?&lt;br /&gt;
&lt;br /&gt;
Well, jQuery provides another method to perform an ajax call which is jQuery.ajax(). This is jQuery's low-level AJAX implementation. See $.get, $.post etc. for higher-level abstractions that are often easier to understand and use, but don't offer as much functionality (such as error callbacks).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;jQuery.ajax(url [, settings] )
&lt;/pre&gt;There are various settings options available for this method. For complete list visit &lt;a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings" target="_blank"&gt;http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This method provides callback for success, error and complete. So which means that we can handle error, success and also perform any operation when the ajax request is complete.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$.ajax({
  type: 'POST',
  url: url,
  data: data,
  success: success,
  error : error,
  complete : complete,
  dataType: dataType
});
&lt;/pre&gt;I strongly recommned that it is always better to use jQuery.ajax() over $.post() and $.get(). Having said that, does not mean that $.post() and $.get() are outdatted. If you are using jQuery 1.5 or above, you can still handle the error with $.post() and $.get().&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;From jQuery official documentation&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The Promise interface in jQuery 1.5 also allows jQuery's Ajax methods, including $.post(), to chain multiple .success(), .complete(), and .error() callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;// Assign handlers immediately after making the request,
    // and remember the jqxhr object for this request
    var jqxhr = $.post("example.php", function() {
      alert("success");
    })
    .success(function() { alert("second success"); })
    .error(function() { alert("error"); })
    .complete(function() { alert("complete"); });

    // perform other work here ...

    // Set another completion function for the request above
    jqxhr.complete(function(){ alert("second complete"); });
&lt;/pre&gt;So that means that we can still handle the errors using $.post() as well. &lt;br /&gt;
&lt;br /&gt;
But I still recommened $.ajax() method as it gives these options straight away where on the other side, using $.post() one is handling using &lt;a href="http://api.jquery.com/category/deferred-object/" target="_blank"&gt;&lt;b&gt;deferred object&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-600052270533627201?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/600052270533627201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/avoid-jquerypost-use-jqueryajax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/600052270533627201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/600052270533627201'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/avoid-jquerypost-use-jqueryajax.html' title='Avoid jQuery.Post(), use jQuery.ajax()'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1988109639804670204</id><published>2011-11-29T12:30:00.000+05:30</published><updated>2011-12-11T16:51:00.840+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download jQuery UI 1.8 ebook pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
jQuery UI, the official suite of plugins for the jQuery JavaScript library, gives you a solid platform on which to build rich and engaging interfaces with maximum compatibility, stability, and a minimum of time and effort.&lt;br /&gt;
jQuery UI has a series of ready-made user interface widgets and a comprehensive set of core interaction helpers to reduce the amount of code that you need to write to take a project from conception to completion.&lt;br /&gt;
&lt;br /&gt;
jQuery UI 1.8: The User Interface Library for jQuery has been specially revised for version 1.8 of jQuery UI. It is written to maximize your experience with the library by breaking down each component and walking you through examples that progressively build upon your knowledge, taking you from beginner to advanced usage in a series of easy-to-follow steps.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-zxbQ_RihElg/TtY-YDpuMUI/AAAAAAAABlE/xE01Rt-KgoM/s1600/jQuery1.8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-zxbQ_RihElg/TtY-YDpuMUI/AAAAAAAABlE/xE01Rt-KgoM/s200/jQuery1.8.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Throughout the book, you’ll learn how each component can be initialized in a basic default implementation and then customize and configure each component to tailor it to your application. You’ll look at the configuration options and the methods exposed by each component’s API to see how these can be used to bring out the best of the library. Each chapter will also show you the custom events fired by the component covered and how these events can be intercepted and acted upon.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Get a high-level overview of jQuery Mobile: how it works and how to use it&lt;/li&gt;
&lt;li&gt;Learn about paging and navigation, including dialogs, Ajax content, and history&lt;/li&gt;
&lt;li&gt;Employ jQuery Mobile’s extensive event system to create rich interactions&lt;/li&gt;
&lt;li&gt;Work with toolbars, buttons, lists, forms, and other UI elements&lt;/li&gt;
&lt;li&gt;Create a variety of visual designs with jQuery Mobile’s sophisticated theming system&lt;/li&gt;
&lt;li&gt;Use the jQuery Mobile API for finer control over elements and interactions&lt;/li&gt;
&lt;li&gt;Put everything together and build a mobile app from start to finish&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/book/jquery-ui-1-8-the-user-interface-library-for-jquery/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;
Credit : &lt;a href="http://www.wowebook.pro/book/jquery-ui-1-8-the-user-interface-library-for-jquery/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1988109639804670204?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1988109639804670204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/download-jquery-ui-18-ebook-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1988109639804670204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1988109639804670204'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/download-jquery-ui-18-ebook-pdf.html' title='Download jQuery UI 1.8 ebook pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-zxbQ_RihElg/TtY-YDpuMUI/AAAAAAAABlE/xE01Rt-KgoM/s72-c/jQuery1.8.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1713748295216262131</id><published>2011-11-29T09:30:00.000+05:30</published><updated>2011-11-29T20:22:28.124+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery DatePicker'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI DatePicker'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery UI'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>List of Supported date format by jQuery UI Datepicker</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In this post, we will see the supported date format by jQuery UI datepicker. I have already posted many articles on jQuery UI datepicker implementation and some other cool features which you can achieve using jQuery UI datepicker. &lt;br /&gt;
&lt;br /&gt;
Read my series of articles about jQuery UI datepicker &lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%20UI%20DatePicker"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;here&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Below is the list of jQuery UI datepicker format.&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;Option value&lt;/b&gt;&lt;/td&gt;  &lt;td&gt;&lt;b&gt;Date format&lt;/b&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.ATOM&lt;/td&gt;  &lt;td&gt;"yy-mm-dd"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.COOKIE&lt;/td&gt;  &lt;td&gt;"D, dd M y"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.ISO_8601&lt;/td&gt;  &lt;td&gt;"yy-mm-dd"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.RFC_822&lt;/td&gt;  &lt;td&gt;"D, d M y"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.RFC_850&lt;/td&gt;  &lt;td&gt;"DD, dd-M-y"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.RFC_1036&lt;/td&gt;  &lt;td&gt;"D, d M y"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.RFC_1123&lt;/td&gt;  &lt;td&gt;"D, d M yy"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.RFC_2822&lt;/td&gt;  &lt;td&gt;"D, d M yy"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.RSS&lt;/td&gt;  &lt;td&gt;"D, d M y"&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.TIMESTAMP&lt;/td&gt;  &lt;td&gt;@ (UNIX timestamp)&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;  &lt;td&gt;$.datepicker.W3C&lt;/td&gt;  &lt;td&gt;"yy-mm-dd"&lt;/td&gt;  &lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;
Below is the jQuery code to change the date format.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
var pickerOpts = {dateFormat: $.datepicker.ATOM};
  $("#txtDate").datepicker(
  { 
    $("#txtDate").datepicker(pickerOpts);
  });
});
&lt;/pre&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1713748295216262131?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1713748295216262131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/list-supported-date-format-by-jquery-ui.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1713748295216262131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1713748295216262131'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/list-supported-date-format-by-jquery-ui.html' title='List of Supported date format by jQuery UI Datepicker'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5989243174901152138</id><published>2011-11-28T11:00:00.000+05:30</published><updated>2011-12-11T16:51:00.860+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ebooks'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Books'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download Head First jQuery ebook pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;b&gt;Book Description&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Want to add more interactivity and polish to your websites? Discover how jQuery can help you build complex scripting functionality in just a few lines of code. With Head First jQuery, you’ll quickly get up to speed on this amazing JavaScript library by learning how to navigate HTML documents while handling events, effects, callbacks, and animations. By the time you’ve completed the book, you’ll be incorporating Ajax apps, working seamlessly with HTML and CSS, and handling data with PHP, MySQL and JSON.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-jUpJt3PJqJo/TtY98owyjaI/AAAAAAAABk8/_VeATVbbKT4/s1600/HeadFirst.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/-jUpJt3PJqJo/TtY98owyjaI/AAAAAAAABk8/_VeATVbbKT4/s200/HeadFirst.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to learn—and understand—how to create interactive web pages, unobtrusive script, and cool animations that don’t kill your browser, this book is for you.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Use jQuery with DOM to overcome the limitations of HTML and CSS&lt;/li&gt;
&lt;li&gt;Learn how jQuery selectors and actions work together&lt;/li&gt;
&lt;li&gt;Write functions and wire them to interface elements&lt;/li&gt;
&lt;li&gt;Use jQuery effects to create actions on the page&lt;/li&gt;
&lt;li&gt;Make your pages come alive with animation&lt;/li&gt;
&lt;li&gt;Build interactive web pages with jQuery and Ajax&lt;/li&gt;
&lt;li&gt;Build forms in web applications&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Click &lt;span style="color: #990000;"&gt;&lt;a href="http://www.wowebook.pro/download/3357/"&gt;&lt;span style="color: #990000;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to download the book&lt;/div&gt;
Credit : &lt;a href="http://www.wowebook.pro/book/head-first-jquery/"&gt;Wow!ebook.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5989243174901152138?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5989243174901152138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/download-head-first-jquery-ebook-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5989243174901152138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5989243174901152138'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/download-head-first-jquery-ebook-pdf.html' title='Download Head First jQuery ebook pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-jUpJt3PJqJo/TtY98owyjaI/AAAAAAAABk8/_VeATVbbKT4/s72-c/HeadFirst.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3606407948513558503</id><published>2011-11-28T10:00:00.000+05:30</published><updated>2011-11-28T10:00:00.163+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Tips to use jQuery selectors effieciently</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;It is pretty important to understand how to write efficient element selection statement. One has to be very careful while jquery selector statement. Below are some tips on how to use your jQuery selectors efficiently.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #351c75; font-size: large;"&gt;1. Always try to use ID as selector &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can use ID as selector in jQuery. See below jQuery code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#elmID");&lt;/pre&gt;When IDs are used as selector then jQuery internally makes a call to getElementById() method of Java script which directly maps to the element. &lt;br /&gt;
&lt;br /&gt;
When Classes are used as selector then jQuery has to do DOM traversal.So when DOM traversal is performed via jQuery takes more time to select elements. In terms of speed and performance, it is best practice to use IDs as selector.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #351c75; font-size: large;"&gt;2. Use class selector with tags&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can use CSS classes as selector. For example, to select elements with "myCSSClass" following jQuery code can be used.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(".myCSSClass");&lt;/pre&gt;As said earlier, when classes are used DOM traversal happens. But there could be a situation where you need to use classes as selector. For better performance, you can use tag name with the class name. See below&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("div.myCSSClass");
&lt;/pre&gt;Above jQuery code, restricts the search element specific to DIV elements only.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #351c75; font-size: large;"&gt;3. Keep your selector simple, don't make it complex&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Avoid complex selectors. You should use make your selectors simple, unless required.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("body .main p#myID em");
&lt;/pre&gt;Instead of using such a complex selector, we can simplify it. See below.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("p#myID em");&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #351c75; font-size: large;"&gt;4. Don't use your selector repeatedly.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
See below jQuery code. The selectors are used thrice for 3 different operation.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#myID").css("color", "red");
$("#myID").css("font", "Arial");
$("#myID").text("Error occurred!");
&lt;/pre&gt;The problem with above code is, jQuery has to traverse 3 times as there are 3 different statements.But this can be combined into a single statement.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("p").css({ "color": "red", "font": "Arial"}).text("Error occurred!");  
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #351c75; font-size: large;"&gt;5. Know how your selectors are executed&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Do you know how the selectors are executed? Your last selectors is always executed first. For example, in below jQuery code, jQuery will first find all the elements with class ".myCssClass" and after that it will reject all the other elements which are not in "p#elmID".&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("p#elmID .myCssClass"); 
&lt;/pre&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3606407948513558503?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3606407948513558503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/tips-to-use-jquery-selectors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3606407948513558503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3606407948513558503'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/tips-to-use-jquery-selectors.html' title='Tips to use jQuery selectors effieciently'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-703054821324457505</id><published>2011-11-23T21:43:00.001+05:30</published><updated>2011-11-23T21:54:11.709+05:30</updated><title type='text'>Now it is easy to contact us</title><content type='html'>Well, now it's pretty easy to stay connected with us. You can write your queries, suggestions and ideas to us so that we can improve this blog and make it more useful for all my readers. You can also contact us, if you want to promote your jQuery plugins or websites. We can provide space on our blog to promote your site.&lt;br /&gt;
&lt;br /&gt;
Click &lt;a href="http://jquerybyexample.blogspot.com/p/contact-us.html"&gt;&lt;b&gt;here &lt;/b&gt;&lt;/a&gt;to go to Contact us page. This link is also available on right side of our blog.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-703054821324457505?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/703054821324457505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/now-it-is-easy-to-contact-us.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/703054821324457505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/703054821324457505'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/now-it-is-easy-to-contact-us.html' title='Now it is easy to contact us'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8249344345565409830</id><published>2011-11-23T20:30:00.001+05:30</published><updated>2011-11-23T20:34:35.049+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Disable "Enter" key on page using jQuery</title><content type='html'>Today, I got a strange requirement from my client that whenever the "Enter" key is pressed on the page, the page should not be submitted. It should only be submitted when user clicks the submit button using mouse. Well, this was pretty simple and easy with jQuery. I have implemented it in 2 mins and thought of sharing with all my readers. See below jQuery code.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$("#form").keypress(function(e) {
  if (e.which == 13) {
    return false;
  }
});
&lt;/pre&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8249344345565409830?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8249344345565409830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/disable-enter-key-on-page-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8249344345565409830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8249344345565409830'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/disable-enter-key-on-page-using-jquery.html' title='Disable &quot;Enter&quot; key on page using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3650701540789443439</id><published>2011-11-20T20:13:00.001+05:30</published><updated>2011-11-20T20:35:49.846+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Mobile'/><title type='text'>jQuery Mobile 1.0 released...</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;After so many minor releases and Beta release, after one year or so jQuery team has finally released a stable 1.0 release for jQuery mobile. According to jQuery team it is rock solid release for jQuery mobile. jQuery Mobile 1.0 Final Requires jQuery core 1.6.4.&lt;br /&gt;
&lt;br /&gt;
Below are some useful link for your reference.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://jquerymobile.com/demos/1.0/"&gt;&lt;b&gt;Demos &amp;amp; Documentation&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://jquerymobile.com/demos/1.0/docs/about/getting-started.html"&gt;&lt;b&gt;Quick Start Guide&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.zip"&gt;&lt;b&gt;Download 1.0 Zip&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Download&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CDN-Hosted JavaScript:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Uncompressed: &lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.js"&gt;jquery.mobile-1.0.js&lt;/a&gt; (useful for debugging)&lt;br /&gt;
Minified and Gzipped: &lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"&gt;jquery.mobile-1.0.min.js&lt;/a&gt; (24KB, ready to deploy)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CDN-Hosted CSS:&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.css"&gt;Uncompressed with Default theme: jquery.mobile-1.0.css&lt;/a&gt; (useful for debugging)&lt;br /&gt;
&lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css"&gt;Minified and Gzipped with Default theme: jquery.mobile-1.0.min.css&lt;/a&gt; (7KB, ready to deploy)&lt;br /&gt;
&lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile.structure-1.0.css"&gt;Uncompressed structure without a theme: jquery.mobile.structure-1.0.css&lt;/a&gt; (useful for theme development)&lt;br /&gt;
&lt;a href="http://code.jquery.com/mobile/1.0/jquery.mobile.structure-1.0.min.css"&gt;Minified and Gzipped structure without a theme: jquery.mobile.structure-1.0.min.css&lt;/a&gt; (6KB, ready to deploy)&lt;br /&gt;
&lt;br /&gt;
Also read my articles&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/01/get-started-with-jquery-mobile.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;How to start with jQuery mobile&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Copy-and-Paste Snippet for CDN-hosted files (recommended):&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css&amp;quot; /&amp;gt;
&amp;lt;script src=&amp;quot;http://code.jquery.com/jquery-1.6.4.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src=&amp;quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Microsoft CDN hosted jQuery Mobile files:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.asp.net/ajaxLibrary/CDNjQueryMobile10.ashx"&gt;http://www.asp.net/ajaxLibrary/CDNjQueryMobile10.ashx&lt;/a&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/01/download-jquery-mobile-get-started-pdf.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Download jQuery mobile get started pdf&lt;br /&gt;
&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3650701540789443439?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3650701540789443439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/j.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3650701540789443439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3650701540789443439'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/j.html' title='jQuery Mobile 1.0 released...'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2046775885237683548</id><published>2011-11-16T20:17:00.001+05:30</published><updated>2011-11-16T20:43:33.782+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Zoom an image on hover using Zoom jQuery plugin</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Well one of the popular post of my blog is "&lt;a href="http://jquerybyexample.blogspot.com/2011/02/how-to-zoom-image-on-mouse-over-using.html" target="_blank"&gt;&lt;b&gt;How to Zoom image on mouseover using jQuery&lt;/b&gt;&lt;/a&gt;", which shows how to zoom an image using jQuery. But today, I found a image zoom jQuery plugin which does the same thing but in a different way. You can download this plugin from &lt;a href="http://jacklmoore.com/zoom/zoom.zip"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Things to note here is that this the plugin "Zoom" appends html inside the element it is assigned to, so that element has to be able to accept html like a, span, li, div, etc. That means your image tag must be placed inside any of these tags  like a, span, li, div to make this plugin work. After that is done, just call the zoom() function on the parent element, not on the image element. For example, I have placed the image tag inside the span tag.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;span class='zoom' id='ex'&amp;gt;
&amp;lt;img src='flowers.jpg' width='500' height='300' /&amp;gt;
&amp;lt;/span&amp;gt;
&lt;/pre&gt;Now, the zoom() function should be associated with span element, not with image. See below.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
   $('#ex').zoom();
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/cvjsN/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/cvjsN/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;This plugin by default supports the zoom on mouse over but there is another option available with this plugin. You can also zoom the image by pressing the mouse and holding it. This option is called "Grab" in this plugin. See below code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
  $('#ex2').zoom({ grab: true });
});
&lt;/pre&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This plugin is developed by "Jack Moore". You can visit his website &lt;a href="http://jacklmoore.com/" target="_blank"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;. Visit official &lt;b&gt;&lt;a href="http://jacklmoore.com/zoom/" target="_blank"&gt;website&lt;/a&gt; &lt;/b&gt;for this plugin.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2046775885237683548?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2046775885237683548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/zoom-image-on-hover-using-zoom-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2046775885237683548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2046775885237683548'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/zoom-image-on-hover-using-zoom-jquery.html' title='Zoom an image on hover using Zoom jQuery plugin'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2949793125123892488</id><published>2011-11-12T11:05:00.001+05:30</published><updated>2011-11-13T15:02:08.227+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>jQuery addressPicker Plugin explained</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today, I am going to explain you a jQuery plugin called "addressPicker". The beauty of this plugin is that it has auto-complete feature which comes from google map geocoder suggestion. It is like you are searching something on Google map and the desired address comes in the auto-complete. See below Image.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-HbaJ4vC8Lgw/Tr4MgrOFqbI/AAAAAAAABko/-qAKzQpIV8Q/s1600/Address1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://3.bp.blogspot.com/-HbaJ4vC8Lgw/Tr4MgrOFqbI/AAAAAAAABko/-qAKzQpIV8Q/s400/Address1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Exciting..Isn't it? So how do we do this? Well, first of all, you need to reference 2 js libraries in your code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;http://maps.google.com/maps/api/js?sensor=false
http://xilinus.com/jquery-addresspicker/src/jquery.ui.addresspicker.js&lt;/pre&gt;The first one supports the Google Map geocoder integration and second one is for addressPicker plugin. Or you can also download these from this &lt;a href="https://github.com/sgruhier/jquery-addresspicker"&gt;URL&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
All you need to do is to place a textbox on your page and use below jQuery to have address picker on your page.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#addresspicker").addresspicker();
&lt;/pre&gt;Cool and Simple!!But wait, that is not enough.. This plugin also provides you to facility to show the selected address on Google map, display the country, locality, latitude and longitude. See below image.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-yWv8SmiVqco/Tr4MftlNdpI/AAAAAAAABkg/6p57FgkffB8/s1600/Address2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-yWv8SmiVqco/Tr4MftlNdpI/AAAAAAAABkg/6p57FgkffB8/s1600/Address2.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
To achieve this, just declare 4 text box for country, locality, latitude and longitude. And we also need a div element to show the map. And use below jQuery code to achieve the same.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var addresspickerMap = $("#addresspicker_map" ).addresspicker({
 elements: {
    map:      "#map",
    lat:      "#lat",
    lng:      "#lng",
    locality: '#locality',
    country:  '#country'
 }
});
var gmarker = addresspickerMap.addresspicker( "marker");
gmarker.setVisible(true);
addresspickerMap.addresspicker( "updatePosition");
&lt;/pre&gt;The last 3 lines of above jQuery code, set the marker on Google Map.&lt;br /&gt;
&lt;br /&gt;
Don't forget to add this css class to div map element.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;#map {
  border: 1px solid #DDD; 
  width:300px;
  height: 300px;
  float:left;  
  margin: 0px 0 0 10px;
  -webkit-box-shadow: #AAA 0px 0px 15px;
}
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsbin.com/egacul/edit#preview" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsbin.com/egacul/edit#html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Click &lt;a href="http://xilinus.com/jquery-addresspicker/demos/" target="_blank"&gt;here&lt;/a&gt; to go to original Website and plugin developer.&lt;br /&gt;
&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2949793125123892488?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2949793125123892488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/jquery-addresspicker-plugin-explained.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2949793125123892488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2949793125123892488'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/jquery-addresspicker-plugin-explained.html' title='jQuery addressPicker Plugin explained'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-HbaJ4vC8Lgw/Tr4MgrOFqbI/AAAAAAAABko/-qAKzQpIV8Q/s72-c/Address1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-570440298594563698</id><published>2011-11-10T19:12:00.001+05:30</published><updated>2011-11-10T19:26:35.026+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Animate image on mouseover using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;You have seen on many blogs for social media sharing icon where you take mouse over on the icon, the icon jumps up. See below picture for more details.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-J6AtLNht-O0/TrvVbyGuZJI/AAAAAAAABkY/rrLLerCG0Vw/s1600/SocialMedia.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="97" src="http://1.bp.blogspot.com/-J6AtLNht-O0/TrvVbyGuZJI/AAAAAAAABkY/rrLLerCG0Vw/s200/SocialMedia.PNG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;In this post, I will show you how you can achieve the same thing using jQuery. For the demo, I have placed all the social media icon within a div and I have also set the opacity of the image to 0.5 on document.ready. What we need to do is that on mouseover, adjust the top position of the image and on mouseout reset the top position.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
    $("#divSocial a img").css({ opacity: 0.5 });
     $("#divSocial a img").hover(
       function () {
            $(this).animate({ top: "-15" });
            $(this).css({ opacity: 1 });
       }, 
       function () {
            $(this).animate({ top: "0" });
            $(this).css({ opacity: 0.5 });
       }
   );
});
&lt;/pre&gt;Don't forget to set the relative position of the div, otherwise changing the top attribute value will not work.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;#divSocial a img
{
    position: relative;
}
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/usNdK/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/usNdK/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-570440298594563698?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/570440298594563698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/animate-image-on-mouseover-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/570440298594563698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/570440298594563698'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/animate-image-on-mouseover-using-jquery.html' title='Animate image on mouseover using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-J6AtLNht-O0/TrvVbyGuZJI/AAAAAAAABkY/rrLLerCG0Vw/s72-c/SocialMedia.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1289907344711383279</id><published>2011-11-07T09:33:00.001+05:30</published><updated>2011-12-22T21:48:19.668+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.7'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery.isNumeric in jQuery 1.7</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;As mentioned in my previous post that &lt;a href="http://jquerybyexample.blogspot.com/2011/11/whats-new-in-jquery-17.html"&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;jQuery 1.7 is released&lt;/span&gt;&lt;/b&gt;&lt;/a&gt; and ready to use. With jQuery 1.7, a new function is introduced which is called "isNumeric()". This is a very handy and small utility introduced in 1.7.As the name of the function clearly suggest that it checks whether the passed value is numeric or not. If it is numeric then it returns true, otherwise false. &lt;br /&gt;
&lt;br /&gt;
This function is really useful as it also returns true for negative numbers, decimal numbers, octal integer, Hex numbers and exponential strings. It saves lots of line of your codes and you don't have to worry about the regular expression as well to validate the number.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$.isNumeric("-10");  // true

$.isNumeric(16);     // true

$.isNumeric(0xFF);   // true

$.isNumeric("0xFF"); // true

$.isNumeric("8e5");  // true (exponential notation string)

$.isNumeric(3.1415); // true

$.isNumeric(+10);    // true

$.isNumeric(0144);   // true (octal integer literal)

$.isNumeric("");     // false

$.isNumeric({});     // false (empty object)

$.isNumeric(NaN);    // false

$.isNumeric(null);   // false

$.isNumeric(true);   // false

$.isNumeric(undefined); // false
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/RfPeQ/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/RfPeQ/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1289907344711383279?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1289907344711383279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/jqueryisnumeric-in-jquery-17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1289907344711383279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1289907344711383279'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/jqueryisnumeric-in-jquery-17.html' title='jQuery.isNumeric in jQuery 1.7'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4805542435252462447</id><published>2011-11-07T09:13:00.000+05:30</published><updated>2011-11-07T09:35:35.657+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.7'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>WHAT’S NEW IN JQUERY 1.7</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;jQuery 1.7 is ready for download! You can get the code from the jQuery CDN:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.jquery.com/jquery-1.7.js"&gt;http://code.jquery.com/jquery-1.7.js&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.jquery.com/jquery-1.7.min.js"&gt;http://code.jquery.com/jquery-1.7.min.js&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This new release should also be available on the Google and Microsoft CDNs within a day or two.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;WHAT’S NEW IN JQUERY 1.7&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;a href="http://api.jquery.com/category/version/1.7/"&gt;Version 1.7 tag&lt;/a&gt; at the API site is a great way to get up to speed with the new things in this release. Here’s a rundown of the big items in 1.7 and some things not yet mentioned in the API docs.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;New Event APIs: .on() and .off()&lt;/li&gt;
- This is a new way to attach events to selectors. Currently we have bind,live and delegate to do the same job but with 1.7 they have introduced on and off.
&lt;li&gt;Improved Performance on Delegated Events&lt;/li&gt;
&lt;li&gt;Better Support for HTML5 in IE6/7/8&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/11/jqueryisnumeric-in-jquery-17.html"&gt;jQuery.isNumeric()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;jQuery.Deferred&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Removed Features&lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;jQuery.isNaN()&lt;/li&gt;
&lt;li&gt;jQuery.event.proxy()&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4805542435252462447?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4805542435252462447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/whats-new-in-jquery-17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4805542435252462447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4805542435252462447'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/11/whats-new-in-jquery-17.html' title='WHAT’S NEW IN JQUERY 1.7'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1605152121348041607</id><published>2011-10-24T16:07:00.000+05:30</published><updated>2011-12-20T19:53:13.047+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Validate Date format using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In this post, we will see how can you validate the user's entered input date's format using jQuery. For demo, I have used "mm/dd/yyyy" or "mm-dd-yyyy" format to be considered as valid format. The date format checking is done using regular expression. So first, let's create a function which validate any input value against the regular expression.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;function ValidateDate(dtValue)
{
var dtRegex = new RegExp(/\b\d{1,2}[\/-]\d{1,2}[\/-]\d{4}\b/);
return dtRegex.test(dtValue);
}
&lt;/pre&gt;Below is the HTML code. There is a span tag next to the textbox with cssclass="error" which is displayed if the entered date is not valid. By default, it will be hidden.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;span&amp;gt;Enter Date: &amp;lt;/span&amp;gt;&amp;lt;input type="text" id="txtDate" /&amp;gt;
&amp;lt;span class="error"&amp;gt; Invalid Date.(mm/dd/yyyy or mm-dd-yyyy)
&amp;lt;/span&amp;gt;
&amp;lt;input id="btnSubmit" type="submit" value="Submit"&amp;gt;
&lt;/pre&gt;CSS class for error message&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;.error
{
    color: red;
    font-family : Verdana;
    font-size : 8pt;
}
&lt;/pre&gt;Above ValidateDate() function will check the argument value against this regular expression. If the entered value is in mm/dd/yyyy or mm-dd-yyyy format then this function will return true, otherwise false.&lt;br /&gt;
&lt;br /&gt;
Also read,&lt;span style="font-size: large;"&gt;&amp;nbsp;&lt;b&gt;&lt;span style="color: #990000;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/12/validate-date-using-jquery.html"&gt;Validate Date using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
Below jQuery code gets called on click of submit button, which reads the value from the text box and calls the ValidateDate() function. If it is true, then form is submitted and error message is not displayed to the user. Otherwise, error message will appear next to the textbox and user has to correct the value before submitting the form again.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
$('.error').hide();
$('#btnSubmit').click(function(event){
   var dtVal=$('#txtDate').val();
   if(ValidateDate(dtVal))
   {
      $('.error').hide();
   }
   else
   {
     $('.error').show();
     event.preventDefault();
   }
   });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/RagGb/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/RagGb/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;Also read,&lt;span style="font-size: large;"&gt; &lt;a href="http://jquerybyexample.blogspot.com/2011/12/validate-date-using-jquery.html"&gt;&lt;b&gt;&lt;span style="color: #990000;"&gt;Validate Date using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1605152121348041607?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1605152121348041607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/validate-date-format-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1605152121348041607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1605152121348041607'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/validate-date-format-using-jquery.html' title='Validate Date format using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-500826040128535311</id><published>2011-10-18T22:18:00.000+05:30</published><updated>2011-10-18T22:34:04.934+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>How to add trailing image to mouse cursor using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;You must have seen on many sites when an image moves near the mouse as per the mouse movement. I was wondering how to implement this so I went ahead and find the solution using jQuery. In this post, I will show you how you can add trailing image to mouse cursor movement using jQuery on your site as well. Let me give brief idea about the solution.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;First place an image anywhere in your page.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;img src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif"
width="75px" height="75px" id="imgFollow"/&amp;gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Fetch the current position (X and Y) of mouse. Read my other post "&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-how-to-get-mouse-cursor.html" target="_blank"&gt;How to get mouse cursor position&lt;/a&gt;&lt;/b&gt;"&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Set the top and left position of the image according to the mouse cursor X and Y value. To set the position of the image, use offset() method of jQuery. The offset() method set or returns the offset (position) for the selected elements, relative to the document.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;Remember to put jQuery code into mousemove event of the document so that on every mouse move, the image also move accordingly.&lt;br /&gt;
&lt;br /&gt;
That's it. See below jQuery code. I have set top value 20 pixel more in this code intentionally so that image doesn't overlap the mouse cursor.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){
  $(document).mousemove(function(e){
      $('#imgFollow').offset({left:e.pageX,top:e.pageY+20});    
  });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/8Es6K/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/8Es6K/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Don't forget to read:&lt;/b&gt;&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/08/mostly-used-and-essential-jquery-code.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;Mostly used and essential jQuery code snippets&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;. &lt;br /&gt;
&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/08/mostly-asked-jquery-interview-questions.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;Mostly asked jQuery interview questions list&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;. &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-500826040128535311?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/500826040128535311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-add-trailing-image-to-mouse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/500826040128535311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/500826040128535311'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-add-trailing-image-to-mouse.html' title='How to add trailing image to mouse cursor using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7692588333131203816</id><published>2011-10-15T17:14:00.000+05:30</published><updated>2011-10-15T17:14:14.608+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>How to create your portfolio using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Well, in this post I am not going to show you how to create portfolio using jQuery rather I will share something good and amazing with you which I came&amp;nbsp;across&amp;nbsp;today. Which is how to create sliding portfolio using jQuery with ease and great speed. First take a look at below picture. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://speckyboy.com/wp-content/uploads/2011/10/one-page-portfolio-with-jquery-screenshot.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://speckyboy.com/wp-content/uploads/2011/10/one-page-portfolio-with-jquery-screenshot.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This is a single page portfolio created using jQuery with 9 tabs. And on tab transition, very light weight and cool animation is provided. You must see the demo first. Take a look at demo on below link.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://speckyboy.com/demo/one-page-portfolio-with-jquery/index.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; &lt;/div&gt;I must say this is absolutely fantastic and brilliant. It is so light weight and have good animation which makes it more attractive. So what are you waiting for? Take a look at the code and create your own portfolio.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See &lt;b&gt;&lt;a href="http://speckyboy.com/2011/10/12/how-to-build-a-sliding-one-page-portfolio-with-jquery/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;Reference&lt;/b&gt;: &lt;a href="http://speckyboy.com/" target="_blank"&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;speckyboy&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7692588333131203816?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7692588333131203816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-create-your-portfolio-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7692588333131203816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7692588333131203816'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-create-your-portfolio-using.html' title='How to create your portfolio using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5201782728544682011</id><published>2011-10-07T00:00:00.000+05:30</published><updated>2011-10-10T21:58:27.835+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to call jQuery code only before the ASP.NET postback</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;My colleague has got into a tricky situation where the requirement was to call the specific lines of jQuery code only before the &lt;a href="http://dotnet.tekyt.info/?p=30" target="_blank"&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;postback&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;. "&lt;i&gt;PostBack is the name given to the process of submitting an ASP.NET page to the server for processing .&lt;/i&gt;". Once there is a postback (on click of button) that particular code should never ever get called again. Well, the situation is tricky but no so difficult. All he needs to do is to find out the postback occurrence using jQuery. &lt;br /&gt;
&lt;br /&gt;
So the solution is that using &lt;b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx" target="_blank"&gt;isPostBack &lt;/a&gt;&lt;/b&gt; on the server side, register a hidden field in the page. And in the jQuery code, create object of the hidden field and check whether it is null or not. It will be null initially because it is not created yet. After the postback happens the hidden field gets created so next time the object will not be null. To register hidden field from ASP.NET code behind, you can use &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerhiddenfield.aspx" target="_blank"&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;ClientScript.RegisterHiddenField&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;.This method registers a hidden field in the page.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;protected void Page_Load(object sender, EventArgs e)
{
   if (IsPostBack)
   {
        ClientScript.RegisterHiddenField("hdnPostBack", "1");
   }
 }
&lt;/pre&gt;Below jQuery  code, first creates a object named "isPostBackOccured" of "hdnPostBack" hidden field. So when the page is running for the first time, it doesn't find the hidden field as it is not registered yet. So it will be null and you will see alert ("Page is called first Time"). But when the postback happens (using button click, or drop down change), the above asp.net code registers hidden field. So after the postback, the "isPostBackOccured" object will no longer be null and you will see an alert box with the message "Page is called after Postback".&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function () {
    var isPostBackOccured = document.getElementById('hdnPostBack');
    if (isPostBackOccured== null) alert('Page is called first Time');
    else alert('Page is called after Postback');
});

&lt;/pre&gt;&lt;i&gt;&lt;b&gt;Note&lt;/b&gt;: Just for the demo, I have kept these alerts but you should put your actual jQuery code.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Sweet and Simple.....&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5201782728544682011?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5201782728544682011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-call-jquery-code-only-before.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5201782728544682011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5201782728544682011'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-call-jquery-code-only-before.html' title='How to call jQuery code only before the ASP.NET postback'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-112038700956841236</id><published>2011-10-06T11:30:00.000+05:30</published><updated>2011-10-06T16:30:18.687+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>jQuery Performance tips &amp; tricks from jQuery By Example</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Always use the latest version of jQuery as your website will be benefited from performance improvement done by the jQuery team in latest release. Learn "&lt;a href="http://jquerybyexample.blogspot.com/2011/04/how-to-always-reference-latest-version.html"&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;How to always reference latest version of jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;"&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Be smart while using selectors. As there are many ways to select element using selectors but that doesn't mean that all are equal. Always try to use ID and Element as selector as they are very fast. Even the class selectors are slower than ID selector. Read more about&lt;a href="http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-examples.html" target="_blank"&gt; &lt;b&gt;&lt;span style="color: blue;"&gt;jQuery selector.&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Use IDs instead of Classes as selector. Read here &lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-why-use-ids-instead-of.html"&gt;&lt;b&gt;&lt;span style="color: blue;"&gt;why&lt;/span&gt;&lt;/b&gt;?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://jquerybyexample.blogspot.com/2011/03/always-minimize-or-minify-your.html"&gt;&lt;span style="color: blue;"&gt;Always Minimize or Minify your JavaScript Code&lt;/span&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Always use the compressed version of jQuery. Read "&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-of-day.html"&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;Why to use compressed version of jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;".
&lt;/li&gt;
&lt;li&gt;
Use CACHING to store selection so that it can be used later on. This will improve the performance.
&lt;/li&gt;
&lt;li&gt;
Just for the sake of completing the task, don't repeat your code as it increases the lines of code and reduces performance.
&lt;/li&gt;
&lt;li&gt;
Don't use jQuery unless it is not necessary. 
&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-112038700956841236?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/112038700956841236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/jquery-performance-tips-tricks-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/112038700956841236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/112038700956841236'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/jquery-performance-tips-tricks-from.html' title='jQuery Performance tips &amp; tricks from jQuery By Example'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7408098339994638215</id><published>2011-10-05T20:20:00.000+05:30</published><updated>2011-10-05T20:20:07.839+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to handle broken image using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
It is quite possible that sometimes the images on web page don't load properly. There can be many reasons for this problem like path of the image is changed or it is removed or renamed. So in such situation, the browser will display broken image sign. (Vary from browser to browser). To overcome this problem,  we can use jQuery to handle such images. When the image is not loaded properly, one can use error method on images to handle such images. There are 3 possible solutions for this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Hide the broken image.
&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('img').error(function() {
  $(this).hide();
});
&lt;/pre&gt;
&lt;b&gt;2. Remove the broken image
&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('img').error(function() {
  $(this).remove();
});
&lt;/pre&gt;
&lt;b&gt;3. Replace it with other image.
&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('img').error(function() {
  $(this).src = "/images/noimage.gif";
  $(this).onerror = "";
}
&lt;/pre&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7408098339994638215?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7408098339994638215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-handle-broken-image-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7408098339994638215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7408098339994638215'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/10/how-to-handle-broken-image-using-jquery.html' title='How to handle broken image using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6614403926227971190</id><published>2011-09-26T17:48:00.000+05:30</published><updated>2011-09-26T17:48:56.012+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>Run JavaScript only after page is completely loaded</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Before we got into the actual problem it is important to know and understand the fundamental difference between DOM loading and Page Loading. When we say DOM loading that means all the DOM elements are completely loaded but it is quite possible that some of the elements like images are not loaded completely. When we say "Page loading" which means that along with all the DOM elements, other elements like images are also loaded completely.&lt;br /&gt;
&lt;br /&gt;
jQuery document.ready() gets called immediately after DOM elements are loaded but window.onload() which is Javascript event gets called when page is completely loaded. Read "&lt;a href="http://jquerybyexample.blogspot.com/2011/03/is-windowonload-is-different-from.html" target="_blank"&gt;&lt;b&gt;Is window.onload is different from document.ready()&lt;/b&gt;&lt;/a&gt;"
&lt;br /&gt;
&lt;br /&gt;
So sometimes you may encounter a situation where you need to run the Javascript code once your page is loaded completely. So how do you achieve that? Well, the solutions is combination of jQuery and JavaScript. The solution is to bind the window.onload event in document.ready().
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(window).bind("load", function() {
   // code here
});
&lt;/pre&gt;
&lt;pre class="brush:javascript"&gt;
&lt;/pre&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6614403926227971190?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6614403926227971190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/run-javascript-only-after-page-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6614403926227971190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6614403926227971190'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/run-javascript-only-after-page-is.html' title='Run JavaScript only after page is completely loaded'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-593481629461898191</id><published>2011-09-13T14:48:00.000+05:30</published><updated>2011-09-13T14:48:48.754+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Grid View'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Change cursor to hand on mouseover in GridView using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
With continuation with my &lt;a href="http://jquerybyexample.blogspot.com/search/label/GridView"&gt;Grid View&lt;/a&gt; series posts,&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html"&gt;Formatting ASP.NET GridView using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/highlight-row-on-mouseover-in-gridview.html"&gt;Highlight row on mouseover in GridView using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/09/how-to-remove-rows-from-gridview-using.html"&gt;How to remove rows from GridView using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In this post, I will show you how to change the cursor to Hand style cursor when user takes mouse on the rows of GridView. It is fairly simple. See below jQuery code.
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  $("#&amp;lt;%=gdRows.ClientID%&amp;gt;  tr:has(td)").hover(function() {
    $(this).css("cursor", "hand");
  });
});
&lt;/pre&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-593481629461898191?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/593481629461898191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/change-cursor-to-hand-on-mouseover-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/593481629461898191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/593481629461898191'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/change-cursor-to-hand-on-mouseover-in.html' title='Change cursor to hand on mouseover in GridView using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4342412626271459681</id><published>2011-09-12T09:38:00.000+05:30</published><updated>2011-09-12T09:38:21.914+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Grid View'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to remove rows from GridView using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
With continuation with my &lt;a href="http://jquerybyexample.blogspot.com/search/label/GridView"&gt;Grid View&lt;/a&gt; series posts,&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html"&gt;Formatting ASP.NET GridView using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/highlight-row-on-mouseover-in-gridview.html"&gt;Highlight row on mouseover in GridView using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In this post, I will show you how to remove any row in grid view using jQuery. The task is pretty simple. One need to bind the click event with every &lt;i&gt;tr &lt;/i&gt;which has only &lt;i&gt;td&lt;/i&gt; not &lt;i&gt;th&lt;/i&gt; and on click of event remove the clicked row. See below jQuery code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  $("#&amp;lt;%=gdRows.ClientID%&amp;gt; tr:has(td)").click(function() {
     $(this).remove();
  });
});
&lt;/pre&gt;
Aha..How simple it is..Isn't it? But it would be nice if we show the remove row effect using some animation for better user experience. Well, not to worry when there is jQuery. See below jQuery code.
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  $("#&amp;lt;%=gdRows.ClientID%&amp;gt; tr:has(td)").click(function() {
     $(this).fadeOut(1000, function() {
        $(this).remove();
     });
  });
});
&lt;/pre&gt;
&lt;i&gt;&lt;i&gt;[Note: This jQuery code handles only Client Side Updates, not server side. You still need to server side code to delete the row permanently.]&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4342412626271459681?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4342412626271459681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/how-to-remove-rows-from-gridview-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4342412626271459681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4342412626271459681'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/how-to-remove-rows-from-gridview-using.html' title='How to remove rows from GridView using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4835050773423490307</id><published>2011-09-02T18:36:00.000+05:30</published><updated>2011-09-02T18:36:09.247+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery Performance Tips And Tricks</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Well, performance is the key element for any web application and understanding the factor which can impact performance of your web application, is another pretty important thing. As we are using jQuery in our web application so it is very important to know jQuery performance tips and tricks which we can make a practice.&lt;br /&gt;
&lt;br /&gt;
I found a great presentation which is must for every jQuery developer to read. Not only read, but make it a practice to use in your day to day code. Special thanks to "&lt;a href="http://addyosmani.com/" target="_blank"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Addy Osmani&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;" for making this presentation and putting it in a manner, which is quite easy to understand. This presentation discusses about 10 jQuery tips and tricks that can&amp;nbsp;definitely&amp;nbsp;help to write better jQuery code&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Go to &lt;b&gt;&lt;a href="http://addyosmani.com/jqprovenperformance/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;Presentation&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4835050773423490307?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4835050773423490307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/jquery-performance-tips-and-tricks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4835050773423490307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4835050773423490307'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/09/jquery-performance-tips-and-tricks.html' title='jQuery Performance Tips And Tricks'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5735658476566905540</id><published>2011-08-31T09:34:00.000+05:30</published><updated>2011-08-31T09:34:28.571+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery docs'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download jQuery How to Select element cheat sheet</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
I found another cheat sheet which have all the syntax that tells how can you select elements in jQuery. You can download the cheat sheet from below link.
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
&lt;a href="http://comp345.awardspace.com/select_element_cheatsheet.pdf"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;&lt;b&gt;Download PDF&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5735658476566905540?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5735658476566905540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/download-jquery-how-to-select-element.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5735658476566905540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5735658476566905540'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/download-jquery-how-to-select-element.html' title='Download jQuery How to Select element cheat sheet'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2380265820603602063</id><published>2011-08-30T16:02:00.000+05:30</published><updated>2011-08-30T16:03:53.818+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery docs'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download jQuery CSS Cheat Sheet</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Today while searching, I found a jQuery CSS cheat sheet and it's worth. I have downloaded my copy. Download your copy as well.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
&lt;a href="http://comp345.awardspace.com/jquery_css_cheatsheet.pdf"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;&lt;b&gt;Download PDF&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2380265820603602063?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2380265820603602063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/download-jquery-css-cheat-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2380265820603602063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2380265820603602063'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/download-jquery-css-cheat-sheet.html' title='Download jQuery CSS Cheat Sheet'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-182839025495500508</id><published>2011-08-30T10:55:00.000+05:30</published><updated>2011-08-30T10:55:32.493+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Different ways to refresh or reload page using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
In this post, I will show you the different ways using which you can reload or refresh the webpage using jQuery. The first method is nothing to do with jQuery. It is a HTML tag which you need to put in the head section of your page and your page will get refreshed automatically after specified interval.
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;meta http-equiv="refresh" content="10"&amp;gt;
&lt;/pre&gt;
The meta tag with "http-equiv" is used to refresh the page. This attribute tells the browser that this meta tag is sending an HTTP command rather than a standard meta tag. Refresh is an actual HTTP header used by the web server.The content attribute in the tag is having value in seconds. As per the above code, it is set to 10, which means after 10 seconds your page will get refreshed or reloaded.&lt;br /&gt;
&lt;br /&gt;
You can also use jQuery to refresh/reload the page automatically.  See below jQuery code.
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;function ReloadPage() { 
   location.reload();
};

$(document).ready(function() {
  setTimeout("ReloadPage()", 10000); .
});
&lt;/pre&gt;
location.reload() will reload the page again. The advantage of location.reload() is that it works with all the major browsers.&lt;br /&gt;
&lt;br /&gt;
If you want to reload the page on click of button, then you can call location.reload() on button click event. See below jQuery code.
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
     $('#btnReload').click(function() {
             location.reload();
       });
}); 
&lt;/pre&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-182839025495500508?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/182839025495500508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/different-ways-to-refresh-or-reload.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/182839025495500508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/182839025495500508'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/different-ways-to-refresh-or-reload.html' title='Different ways to refresh or reload page using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6035174609477972488</id><published>2011-08-26T12:22:00.000+05:30</published><updated>2011-08-26T12:22:35.077+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Selectors'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Selectors'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS Selectors'/><title type='text'>addClass, removeClass, hasClass and toggleClass in jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
In this post, I will explain about some of the basic but useful jQuery css selectors. These CSS selectors are used to add or remove CSS class, to check whether element has specific css class associated with it or not. Believe me these are basic, but pretty useful.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Add cssClass to specific element
&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#element').addClass('myclass');
&lt;/pre&gt;
&lt;b&gt;Remove cssClass from specific element
&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#element').removeClass('myclass');
&lt;/pre&gt;
&lt;b&gt;Check whether element has the cssClass associated with it
&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#element').hasClass('myclass');
&lt;/pre&gt;
&lt;b&gt;Add or remove cssClass using single css Selector&lt;/b&gt;
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#element').toggleClass('myclass');
&lt;/pre&gt;
&lt;b&gt;&lt;i&gt;.toggleClass()&lt;/i&gt;&lt;/b&gt; is combination of &lt;b&gt;&lt;i&gt;.addClass()&lt;/i&gt;&lt;/b&gt; and &lt;b&gt;&lt;i&gt;.removeClass()&lt;/i&gt;&lt;/b&gt;. It first checks, whether specified cssClass is associated with element or not. if not then it adds it, otherwise it removes it. This is very useful when on button click you want to add and remove css class for any element.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6035174609477972488?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6035174609477972488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/addclass-removeclass-hasclass-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6035174609477972488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6035174609477972488'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/addclass-removeclass-hasclass-and.html' title='addClass, removeClass, hasClass and toggleClass in jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7359601083113739796</id><published>2011-08-23T10:23:00.002+05:30</published><updated>2011-09-20T17:05:26.625+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Mostly used and essential jQuery code examples</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
The advantage of having ready made code examples is that they will save your valuable time.I have prepared a list of common and mostly used jQuery code snippets/example which can be used in any project. These examples are small but yet powerful and essential. I suggest you to bookmark this page and support us by clicking the Google +1 button (Just below the article title).

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/hide-all-elements-of-html-form.html" target="_blank"&gt;Hide all elements of HTML form using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/disableenable-element-using-jquery.html" target="_blank"&gt;Disable/Enable an element using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/07/get-html-of-any-control-using-jquery.html" target="_blank"&gt;How to get HTML of any control using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/07/set-html-of-any-control-using-jquery.html" target="_blank"&gt;How to set HTML of any control using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-check-element-exists-or-not-in.html" target="_blank"&gt;How to Check element exists or not in jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-disable-right-click-using-jquery.html" target="_blank"&gt;How to Disable right click using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-how-to-get-mouse-cursor.html" target="_blank"&gt;How to get mouse cursor position&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;span class="Apple-style-span" style="color: black; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/find-which-mouse-button-clicked-using.html" target="_blank"&gt;Find which mouse button clicked using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/10/jquery-code-to-disable-enable-all.html" target="_blank"&gt;Disable-Enable all controls of page using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/10/jquery-code-to-enable-and-disable-all.html" target="_blank"&gt;Enable/Disable all text boxes using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/make-readonly-textbox-using-jquery.html" target="_blank"&gt;Make readonly textbox using Jquery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/split-function-in-jquery.html" target="_blank"&gt;Split function in jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/using-trim-function-in-jquery.html" target="_blank"&gt;Using trim() function in jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-how-to-detect-browsers.html" target="_blank"&gt;Detect Browsers using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/10/get-aspnet-dropdown-selected-value-and.html" target="_blank"&gt;Get ASP.NET Dropdown selected value and text using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/10/set-max-length-for-aspnet-multiline.html" target="_blank"&gt;Set Max Length for ASP.NET MultiLine Textbox using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-code-convert-string-value-to.html" target="_blank"&gt;jQuery Code: Change text to Uppercase&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/how-to-scroll-to-bottom-of-textarea.html" target="_blank"&gt;How to scroll to the bottom of a textarea using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/12/disable-cut-copy-and-paste-function-for.html" target="_blank"&gt;Disable Cut, Copy and Paste function for textbox using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/12/validate-date-of-birth-is-not-greater.html" target="_blank"&gt;Validate Date of Birth is not greater than current date using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/how-to-zoom-image-using-jquery.html" target="_blank"&gt;How to Zoom an image using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/02/how-to-zoom-image-on-mouse-over-using.html" target="_blank"&gt;How to Zoom image on mouseover using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/07/how-to-zoom-element-text-on-mouseover.html" target="_blank"&gt;How to zoom element text on Mouseover using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/code-to-allow-only-numbers-in-textbox.html" target="_blank"&gt;jQuery code to allow only numbers in textbox&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/03/jquery-code-to-allow-numbers-and-arrow.html" target="_blank"&gt;jQuery code to allow numbers and arrow keys in textbox&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/12/jquery-code-to-allow-numbers-alphabets.html" target="_blank"&gt;jQuery code to allow numbers, alphabets or specific characters&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/03/determine-which-key-was-pressed-using.html" target="_blank"&gt;Determine which key was pressed using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/how-to-disable-spacebar-in-text-box.html" target="_blank"&gt;How to Disable Spacebar in text box using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/03/useful-jquery-code-examples-for-aspnet.html" target="_blank"&gt;Useful jQuery code examples for ASP.NET Controls&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/jquery-to-retrieve-servers-current-date.html" target="_blank"&gt;jQuery to Retrieve Server's current date and time with ASP.NET&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/validate-email-address-using-jquery.html" target="_blank"&gt;Validate email address using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-first-textbox-of.html" target="_blank"&gt;How to Set focus on First textbox of page using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/get-count-of-textboxes-using-jquery.html" target="_blank"&gt;Get total count of textboxes using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-next-textbox-on.html" target="_blank"&gt;How to set focus on next textbox on Enter Key using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/how-to-replace-all-text-on-page-using.html" target="_blank"&gt;How to Replace All Text On Page using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/how-to-put-link-on-image-using-jquery.html" target="_blank"&gt;How to put link on image using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/05/checkuncheck-all-checkboxes-with-jquery.html" target="_blank"&gt;Check/Uncheck All Checkboxes with JQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/highlight-row-on-mouseover-in-gridview.html" target="_blank"&gt;Highlight row on mouseover in GridView using jQuery&lt;/a&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html" target="_blank"&gt;Formatting ASP.NET GridView using jQuery&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Don't forget to read &lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/08/mostly-asked-jquery-interview-questions.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Mostly asked jQuery interview questions list&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;. &lt;/div&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7359601083113739796?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7359601083113739796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/mostly-used-and-essential-jquery-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7359601083113739796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7359601083113739796'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/mostly-used-and-essential-jquery-code.html' title='Mostly used and essential jQuery code examples'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-701638354813658785</id><published>2011-08-02T12:56:00.001+05:30</published><updated>2012-01-05T21:59:23.654+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Mostly asked jQuery interview questions list</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
jQuery is rocking and it has become so popular that it is used almost by every developer. As it has already become more popular, interviewers tend to ask jQuery questions in interview. Below is the list of questions which are asked in almost every jQuery interview. Before you go further, please read my previous article published already about jQuery interview question.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/jquery-interview-question.html" target="_blank"&gt;&lt;b&gt;jQuery Interview Question&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Okay, so I assume that you have read the above article. Let's see some more jQuery interview questions.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Is jQuery a library for client scripting or server scripting?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; Client scripting&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Is jQuery a W3C standard?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; No&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What are jQuery Selectors?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; Selectors are used in jQuery to find out DOM elements. Selectors can find the elements via ID, CSS, Element name and hierarchical position of the element.&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;The jQuery html() method works for both HTML and XML documents?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; It only works for HTML.&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Which sign does jQuery use as a shortcut for jQuery?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; $(dollar) sign.&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What does $("div") will select?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; It will select all the div element in the page.&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What does $("div.parent") will select?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; All the div element with parent class.&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What is the name of jQuery method used for an asynchronous HTTP request?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Ans:&lt;/b&gt; jQuery.ajax()&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-always-load-your-jquery.html" target="_blank"&gt;What is CDN and what are the advantage of  loading jQuery framework from CDN?&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/how-to-load-jquery-locally-when-cdn.html" target="_blank"&gt;How to load jQuery locally when CDN fails?&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/what-is-jquerynoconflict.html" target="_blank"&gt;What is jQuery.noConflict()&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/difference-between-this-and-this-in.html" target="_blank"&gt;Difference between $(this) and 'this' in jQuery&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/02/jquery-empty-vs-remove.html" target="_blank"&gt;jQuery empty() vs remove()&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/03/is-windowonload-is-different-from.html" target="_blank"&gt;Is window.onload is different from document.ready()&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-how-to-check-if-element-is.html" target="_blank"&gt;How to check if element is empty&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/width-vs-csswidth-and-height-vs.html" target="_blank"&gt;width() vs css('width') and height() vs css('height')&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-check-element-exists-or-not-in.html" target="_blank"&gt;How to Check element exists or not in jQuery&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt; &lt;a href="http://jquerybyexample.blogspot.com/2010/08/bind-vs-live-vs-delegate-function.html" target="_blank"&gt;Difference between bind() vs live() vs delegate() function&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-examples.html" target="_blank"&gt;How to use jQuery Selectors with Examples&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/10/jquery-code-to-disable-enable-all.html" target="_blank"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;How to Disable-Enable all controls of page using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/07/jquery-does-not-work-properly-after.html" target="_blank"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What are the possible problems can occur when jQuery and Ajax used in ASP.NET?&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2012/01/why-to-use-google-hosted-jquery-cdn.html" target="_blank"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Why to use Google hosted jQuery CDN?&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;
Don't forget to read &lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/08/mostly-used-and-essential-jquery-code.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Mostly used and essential jQuery code snippets&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;. &lt;/div&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-701638354813658785?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/701638354813658785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/mostly-asked-jquery-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/701638354813658785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/701638354813658785'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/08/mostly-asked-jquery-interview-questions.html' title='Mostly asked jQuery interview questions list'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4681303093120594487</id><published>2011-07-21T16:02:00.000+05:30</published><updated>2011-07-21T16:02:17.037+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery For Beginners'/><title type='text'>An Intensive Exploration Of jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today, while searching internet I came across a detailed video created by &lt;a href="http://www.bennadel.com/" target="_blank"&gt;Ben Nadel&lt;/a&gt;. In this video, he  covers overview of jQuery framework, basic hide/show methods, animation techniques, selectors and AJAX capabilities. Please “DON’T MISS” this video. &lt;b&gt;I highly recommend it.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Below is the list of topics which are covered in this Video.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;What Is jQuery&lt;/li&gt;
&lt;li&gt;UI Effects - Pain Free Animation&lt;/li&gt;
&lt;li&gt;Why I Didn't Like jQuery At First&lt;/li&gt;
&lt;li&gt;jQuery For Developers&lt;/li&gt;
&lt;li&gt;Anonymous Methods&lt;/li&gt;
&lt;li&gt;$() Factory Method&lt;/li&gt;
&lt;li&gt;Wrapping DOM Elements&lt;/li&gt;
&lt;li&gt;jQuery Selectors&lt;/li&gt;
&lt;li&gt;jQuery Selector Moment of Bliss&lt;/li&gt;
&lt;li&gt;Working With The $() Collection&lt;/li&gt;
&lt;li&gt;Attributes And Values&lt;/li&gt;
&lt;li&gt;Moving Elements Around&lt;/li&gt;
&lt;li&gt;Traversing The DOM&lt;/li&gt;
&lt;li&gt;Filtering The jQuery Collection&lt;/li&gt;
&lt;li&gt;Iterating Over The Stack&lt;/li&gt;
&lt;li&gt;jQuery Closures - Awesome Voodoo Magic!&lt;/li&gt;
&lt;li&gt;Eventing Binding And Triggering&lt;/li&gt;
&lt;li&gt;Custom Event Types&lt;/li&gt;
&lt;li&gt;jQuery AJAX&lt;/li&gt;
&lt;li&gt;Monitoring AJAX Requests&lt;/li&gt;
&lt;li&gt;jQuery Data() Method&lt;/li&gt;
&lt;li&gt;Extending jQuery - Plugins And Selectors&lt;/li&gt;
&lt;li&gt;jQuery Is Mad Awesome&lt;/li&gt;
&lt;li&gt;jQuery Resources&lt;/li&gt;
&lt;/ol&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Watch &lt;b&gt;&lt;a href="http://www.bennadel.com/resources/presentations/jquery/video/index.htm" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Video&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;. &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4681303093120594487?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4681303093120594487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/07/intensive-exploration-of-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4681303093120594487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4681303093120594487'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/07/intensive-exploration-of-jquery.html' title='An Intensive Exploration Of jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8049562440489072017</id><published>2011-07-12T17:19:00.001+05:30</published><updated>2011-07-12T17:20:39.002+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to zoom element text on Mouseover using jQuery</title><content type='html'>For one of my requirement, I need to zoom in the text of div element on mouseover and zoom out on mouseout. This was fairly simple with jQuery so I thought to share with you. For example, you want to zoom in the text placed in a div with ID "Content". The default style applied to "Content" div element is below.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;#content
{
font-size:10pt;
font-family:Arial,sans-serif;
}
&lt;/pre&gt;On jQuery side, you need to do following things. &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Fetch the existing size of the element and store it in any variable.&lt;/li&gt;
&lt;li&gt;Double the existing size and store in another variable.&lt;/li&gt;
&lt;li&gt;Set the font size to doubled size on mouseover event of element.&lt;/li&gt;
&lt;li&gt;Set the font size to original size on mouseover event of element.&lt;/li&gt;
&lt;/ol&gt;That's it. See jQuery code below.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  var oldSize = parseFloat($("#content").css('font-size'));
  var newSize = oldSize  * 2;
  $("#content").hover(
    function() {
     $("#content").animate({ fontSize: newSize}, 200);
    },
    function() {
    $("#content").animate({ fontSize: oldSize}, 200);
   }
 );
});
&lt;/pre&gt;Rather than using mouseover and mouseout method seperately, jQuery provides another method named "hover()" which serves purpose of both the methods. Please read more here about &lt;a href="http://jquerybyexample.blogspot.com/2010/08/hover-method-in-jquery.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;hover()&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;. &lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/gAkvq/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/gAkvq/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;Also Read:&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 10px 0; padding: 2px 0 2px 5px;"&gt;&lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/02/how-to-zoom-image-on-mouse-over-using.html"&gt;How to Zoom image on mouseover using jQuery&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8049562440489072017?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8049562440489072017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/07/how-to-zoom-element-text-on-mouseover.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8049562440489072017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8049562440489072017'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/07/how-to-zoom-element-text-on-mouseover.html' title='How to zoom element text on Mouseover using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5339968772557372738</id><published>2011-07-04T16:02:00.000+05:30</published><updated>2011-07-04T16:02:54.904+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Walk through of jQuery inbuilt functions to create animation</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;jQuery offers inbuilt functions to achieve animation effects, thus enable programmers to build  animated pages for a better UI for the web users. Below are some useful inbuilt functions in jQuery to achieve animation effects.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;fadeIn ( [ duration ], [ callback ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method animates the opacity of the matched elements from 0 to 1 i.e. transparent to opaque.&lt;br /&gt;
Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;duration&lt;/b&gt;: This is the duration of the animation&lt;/li&gt;
&lt;li&gt;&lt;b&gt;callback&lt;/b&gt;: This is the callback function on completion of the animation.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;fadeOut( [ duration ], [ callback ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method animates the opacity of the matched elements from 1 to 0 i.e. opaque to transparent.&lt;br /&gt;
Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;duration&lt;/b&gt;: This is the duration of the animation&lt;/li&gt;
&lt;li&gt;&lt;b&gt;callback&lt;/b&gt;: This is the callback function on completion of the animation&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;slideUp( [ duration ], [ callback ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method animates the height of the matched elements with an upward sliding motion. When the height of the element reaches 0, the css property display of the element is updated to none so that the element is hidden on the page. Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;duration&lt;/b&gt;: This is the duration of the animation&lt;/li&gt;
&lt;li&gt;&lt;b&gt;callback&lt;/b&gt;: This is the callback function on completion of the animation&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;slideDown( [ duration ], [ callback ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method animates the height of the matched elements from 0 to the specified maximum height. Thus, it gives slide down effect to the element.&lt;br /&gt;
Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;duration&lt;/b&gt;: This is the duration of the animation&lt;/li&gt;
&lt;li&gt;&lt;b&gt;callback:&lt;/b&gt; This is the callback function on completion of the animation&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Read "&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-use-jquery-slidetoggle-function.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;How to use jQuery slideToggle function&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;slideToggle( [ duration ], [ callback ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method is combination of slideUp and slideDown method. This method animates the height of the matched elements. If the element is initially hidden, it will slide down and makes it visible. If the element is initially visible, it will slide up and make hidden on the page. &lt;br /&gt;
Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;duration&lt;/b&gt;: This is the duration of the animation&lt;/li&gt;
&lt;li&gt;&lt;b&gt;callback:&lt;/b&gt; This is the callback function on completion of the animation&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;stop ( [ clearQueue ], [ jumpToEnd ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method stops the currently running animations on the page.&lt;br /&gt;
Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;clearQueue&lt;/b&gt;: This indicates whether any queued up animations are required to be cleared. The default value is false.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;jumpToEnd&lt;/b&gt;: This indicates if the current animation is to be cleared immediately. The default value is false.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: purple;"&gt;animate ( properties, [ duration ], [ easing ], [ complete ] ):&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
This method allows us to create custom animation effects on any numeric css property. &lt;br /&gt;
Accepted Parameter:&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;properties&lt;/b&gt;: This is the map of css properties to animate, for e.g. width, height, fontSize, borderWidth, opacity, etc.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;duration&lt;/b&gt;: Duration of the animation in milliseconds. The constants "&lt;b&gt;slow&lt;/b&gt;" and &lt;b&gt;"fast"&lt;/b&gt; can be used to specify the durations, and they represent 600 ms and 200 ms respectively.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;easing&lt;/b&gt;: Easing indicates the speed of the animation at different points during the animation. jQuery provides inbuilt swing and linear easing functions. Various plugins can be interfaced if other easing functions are required.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;complete&lt;/b&gt;: This indicates the callback function on completion of the animation.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-disable-jquery-animation.html"&gt;jQuery.fx.off&lt;/a&gt;:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Let's assume that you had written lots of jQuery code and you want to turn off all the jQuery animation because your client doesn't like it due to slow response on some hardware device. What will you do? Either you can find all required code and remove it but that's time consuming or you can use jQuery.fx.off property to make your life easy. &lt;b&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/how-to-disable-jquery-animation.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;See Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5339968772557372738?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5339968772557372738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/07/walk-through-of-jquery-inbuilt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5339968772557372738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5339968772557372738'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/07/walk-through-of-jquery-inbuilt.html' title='Walk through of jQuery inbuilt functions to create animation'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-209387233560923731</id><published>2011-06-29T12:54:00.001+05:30</published><updated>2011-06-29T12:55:56.419+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Grid View'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Highlight row on mouseover in GridView using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In my previous post, I have posted about "&lt;a href="http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Formatting ASP.NET GridView using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;". In this post, I will show you that how to highlight a gridview row on mouseover. See below image. (&lt;i&gt;the image is not showing the mouse cursor, but the cursor is on 3rd row.)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/-zfRo-XA78C0/TgnZKnjP82I/AAAAAAAABdg/D39C6ek_Bck/s1600/Highlight.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="259" src="http://2.bp.blogspot.com/-zfRo-XA78C0/TgnZKnjP82I/AAAAAAAABdg/D39C6ek_Bck/s640/Highlight.png" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
All we need to do is that on mouseover on gridview rows assign any CSS and on mouseout, remove that CSS. Rather than using mouseover and mouseout method seperately, jQuery provides another method named "hover()" which serves purpose of both the methods. Please read more here about &lt;a href="http://jquerybyexample.blogspot.com/2010/08/hover-method-in-jquery.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;hover()&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Below jQuery code, will find all the rows of gridview and using hover method it will assign "LightGrey" color on mouseover and then assign "White" color on mouseout.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  $("#&amp;lt;%=gdRows.ClientID%&amp;gt; tr").hover(function() {
    $(this).css("background-color", "Lightgrey");
   }, function() {
   $(this).css("background-color", "#ffffff");
  });
});
&lt;/pre&gt;&lt;i&gt;If your default backgroud color for row is other than white then put that color code instead of white&lt;/i&gt;. Simple and cool... Isn't it?&lt;br /&gt;
&lt;br /&gt;
But there is a problem with this code. That is it will assign the mouseover and mouseout effect on header row as well. Try it yourself with above code. So how to resolve it? Well, we need to change above code little bit so that it finds only those rows which are having "td", not "th". To do this, we can use &lt;b&gt;"has" &lt;/b&gt;selector of jQuery to find out all the rows which have td. See below jQuery code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
  $("#&amp;lt;%=gdRows.ClientID%&amp;gt; tr:has(td)").hover(function() {
    $(this).css("background-color", "Lightgrey");
   }, function() {
   $(this).css("background-color", "#ffffff");
  });
});
&lt;/pre&gt;Hope you find this post useful.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-209387233560923731?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/209387233560923731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/highlight-row-on-mouseover-in-gridview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/209387233560923731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/209387233560923731'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/highlight-row-on-mouseover-in-gridview.html' title='Highlight row on mouseover in GridView using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-zfRo-XA78C0/TgnZKnjP82I/AAAAAAAABdg/D39C6ek_Bck/s72-c/Highlight.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1716238865048416120</id><published>2011-06-28T12:18:00.001+05:30</published><updated>2011-06-28T15:30:26.038+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to put link on image using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To put link of the image, we normally use &amp;lt;a&amp;gt; tag that contains image tag to show the image. But assume there are 100 images and you need same link for every single image. Putting 100 &amp;lt;a&amp;gt; tag with each image is time consuming and cumbersome. It would be nice if single &amp;lt;a&amp;gt; tag can be used for all the images and put the &amp;lt;a&amp;gt; tag dynamically. Well, no worry when there is jQuery.&lt;br /&gt;
&lt;br /&gt;
jQuery provides a method named "&lt;b&gt;wrap()&lt;/b&gt;", which can be used to insert any HTML structure in set of matched elements. In simple words, if you want put wrapper around your div element then you can use wrap() method. For example, you have a div with ID "Child". &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;div id="Child"&amp;gt;&amp;lt;/div&amp;gt;
&lt;/pre&gt;And want to wrap this div with any parent then you can use "wrap()" method to insert HTML.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#Child').wrap('&lt;div id="Parent"&gt;&lt;/div&gt;');
&lt;/pre&gt;Output:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;div id="parent"&amp;gt;
  &amp;lt;div id="child"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;Same way, we will use the wrap() method to insert hyperlink to image tag so that the image becomes clickable. See below.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
    $("#imgLogo").wrap('&lt;a href="http://jquerybyexample.blogspot.com/"&gt;&lt;/a&gt;');
});
&lt;/pre&gt;In this example, I have used ID as selector but you can use class selector to find all the images with same class and then wrap them with &amp;lt;a&amp;gt; tag. You can also assign target="_blank" in the above &amp;lt;a&amp;gt; tag to open the link in new window.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/raN2g/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/raN2g/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;Also read, "&lt;a href="http://jquerybyexample.blogspot.com/2011/02/how-to-zoom-image-on-mouse-over-using.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;How to Zoom image on mouseover using jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1716238865048416120?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1716238865048416120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/how-to-put-link-on-image-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1716238865048416120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1716238865048416120'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/how-to-put-link-on-image-using-jquery.html' title='How to put link on image using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-3771806037885676452</id><published>2011-06-27T09:52:00.001+05:30</published><updated>2011-06-27T14:46:03.421+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Grid View'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Formatting ASP.NET GridView using jQuery</title><content type='html'>In this post, we will see how easily we can assign alternate background color of ASP.NET Grid Views rows using jQuery. In this example, we will assign grey color to all the odd rows of GridViews. When I say Odd, that means Rows which are having odd numbers like Row1, Row3, Row5 etc. &lt;br /&gt;
&lt;br /&gt;
Let's take a ASP.NET Grid View Control and placed it on ASP.NET Page with ID "gdRows". See below.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;&amp;lt;asp:GridView ID=&amp;quot;gdRows&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&amp;lt;/asp:GridView&amp;gt
&lt;/pre&gt;jQuery provides a selector "&lt;b&gt;:odd&lt;/b&gt;" which selects only odd elements. So we need to filter out all the odd rows and assign the color. To filter the rows, we will use &lt;b&gt;filter()&lt;/b&gt; method of jQuery, which takes selector as argument and returns the elements which matches the selector. See below jQuery Code.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
 $("#&lt;%=gdRows.ClientID%&gt; tr").filter(":odd").css("background-color", "grey");
});
&lt;/pre&gt;You can also use "&lt;b&gt;:even&lt;/b&gt;" selector to assign other than default color to grid view rows.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
 $("#&lt;%=gdRows.ClientID%&gt; tr").filter(":even").css("background-color", "blue");
});
&lt;/pre&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-3771806037885676452?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/3771806037885676452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3771806037885676452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/3771806037885676452'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/formatting-aspnet-gridview-using-jquery.html' title='Formatting ASP.NET GridView using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-604909517234938647</id><published>2011-06-24T12:55:00.000+05:30</published><updated>2011-10-06T19:15:48.998+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to Replace Text On Page using jQuery</title><content type='html'>Today, for one of my requirement, I have to replace all the (.)dots in my page with "---". The basic idea find all the (.) in HTML and replace them with "---". This can be done very easily with jQuery. First you replace the (.) with "---" and assign it to any variable then you need to assign back that value to HTML of the page. See below code.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
    var strNewString = $('body').html().replace(/\./g,'---');
    $('body').html(strNewString);
});
&lt;/pre&gt;Instead of, (.) or "---", text can be anything. All you need is to make change in the replace function arguments and you are good to go.&lt;br /&gt;
&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Jz4Hh/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/Jz4Hh/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-604909517234938647?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/604909517234938647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/how-to-replace-all-text-on-page-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/604909517234938647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/604909517234938647'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/how-to-replace-all-text-on-page-using.html' title='How to Replace Text On Page using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6175813991047950373</id><published>2011-06-22T15:05:00.000+05:30</published><updated>2011-06-22T15:05:29.400+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.6'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery Mobile Beta 1 Released!</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The jQuery Mobile team has announced the release of Beta 1. The new jQuery Mobile is faster, extensible and more compatible. They’re planning on releasing a second Beta in about a month that will begin decoupling our code so you can include only the components you need, add greater extensibility to support dynamic JS-driven sites, and bring even broader device support.&lt;br /&gt;
&lt;br /&gt;
Note that jQuery Mobile 1.0 will require jQuery core 1.6 as a baseline. Going forward, they’ll be supporting the two latest major versions of core but we’re starting with a cleaner baseline for launch. Read &lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerymobile.com/blog/2011/06/20/jquery-mobile-beta-1-released/"&gt;here&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;the full details about the new release of jQuery Mobile.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Download Details:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
CDN-Hosted JavaScript:&lt;br /&gt;
Uncompressed: &lt;a href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.js"&gt;&lt;b&gt;jquery-mobile-1.0b1.js&lt;/b&gt;&lt;/a&gt; (useful for debugging)&lt;br /&gt;
Minified and Gzipped: &lt;a href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"&gt;&lt;b&gt;jquery-mobile-1.0b1.min.js&lt;/b&gt;&lt;/a&gt; (20KB, ready to deploy)&lt;br /&gt;
&lt;br /&gt;
CDN-Hosted CSS:&lt;br /&gt;
Uncompressed: &lt;a href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.css"&gt;&lt;b&gt;jquery-mobile-1.0b1.css&lt;/b&gt;&lt;/a&gt; (useful for debugging)&lt;br /&gt;
Minified and Gzipped: &lt;a href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css"&gt;&lt;b&gt;jquery-mobile-1.0b1.min.css&lt;/b&gt;&lt;/a&gt; (7KB, ready to deploy)&lt;br /&gt;
&lt;br /&gt;
Copy-and-Paste Snippet for CDN-hosted files (recommended):&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /&amp;gt;
&amp;lt;script src="http://code.jquery.com/jquery-1.6.1.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/pre&gt;If you want to host the files yourself you can download a zip of all the files:&lt;br /&gt;
&lt;br /&gt;
ZIP File:&lt;br /&gt;
&lt;br /&gt;
Zip File: &lt;a href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.zip"&gt;&lt;b&gt;jquery-mobile-1.0b1.zip&lt;/b&gt;&lt;/a&gt; (JavaScript, CSS, and images)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6175813991047950373?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6175813991047950373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/jquery-mobile-beta-1-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6175813991047950373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6175813991047950373'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/jquery-mobile-beta-1-released.html' title='jQuery Mobile Beta 1 Released!'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8268367596952159355</id><published>2011-06-16T19:07:00.002+05:30</published><updated>2011-06-24T11:31:54.130+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to Disable Spacebar in text box using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;For one of my requirement, I need to restrict/disable end-user to enter space in the input field or textbox. This was piece of cake with jQuery. All I need to do is to check the keycode of spacebar and restrict its default action on keydown event. See below jQuery code. "txtNoSpaces" is the name of the textbox.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){ 
  $("#txtNoSpaces").keydown(function(event) {
     if (event.keyCode == 32) {
         event.preventDefault();
     }
  });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/MwEkj/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/MwEkj/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;Also read,&lt;br /&gt;
&lt;a href="http://jquerybyexample.blogspot.com/2010/06/code-to-allow-only-numbers-in-textbox.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;jQuery code to allow only numbers in textbox&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://jquerybyexample.blogspot.com/2011/03/jquery-code-to-allow-numbers-and-arrow.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;jQuery code to allow numbers and arrow keys in textbox&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://jquerybyexample.blogspot.com/2011/04/restrict-shift-key-using-jquery.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;Restrict Shift Key using jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8268367596952159355?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8268367596952159355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/how-to-disable-spacebar-in-text-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8268367596952159355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8268367596952159355'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/how-to-disable-spacebar-in-text-box.html' title='How to Disable Spacebar in text box using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1926200453574129797</id><published>2011-06-13T16:06:00.001+05:30</published><updated>2011-06-13T16:10:14.966+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Plugins'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Alert your website visitors when they are using an outdated browser using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;For the developers like us, one of the difficult thing is to support all major browsers. You did your best to achieve this and Your client's end-user complains that developed website is not working properly on IE 6 or older browser. IE 6 an outdated browser. So what do you do? Well, how about having a nice message on top of the page to let your end-users know that they are using an outdated browser when they visit your website. Cool.. Isn't it? No worry, when there is jQuery.&lt;br /&gt;
&lt;br /&gt;
Well, there is a jQuery plugin which you can easily install at your website and this plugin takes care of rest of the things. If the end-user's browser is outdated, then it will display a message on the top. See below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-rCs08TbTGS8/TfXnKCuh3BI/AAAAAAAABdY/_4ysBShE5j4/s1600/Upgrade.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="89" src="http://1.bp.blogspot.com/-rCs08TbTGS8/TfXnKCuh3BI/AAAAAAAABdY/_4ysBShE5j4/s640/Upgrade.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
UpgradeBrowsers is a jQuery plugin which you can easily install on your website so every time someone visits your site from an outdated browser, an alert will be displayed with an invitation to update it to its latest version. If you want your visitors to enjoy the new features in HTML 5 and the capabilities of modern browsers, then UpgradeBrowsers interests you.&lt;br /&gt;
&lt;br /&gt;
First of all, you need to download the js file and CSS file so that you can include them in your page.&lt;br /&gt;
Download the CSS file from &lt;a href="http://upgradebrowsers.com/upgradebrowsers_v01/jquery.upgradebrowsers.min.css" target="_blank"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;here&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
Download the js file &lt;a href="http://upgradebrowsers.com/upgradebrowsers_v01/jquery.upgradebrowsers.min.js" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;here&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Now, include these files in your page and call "&lt;b&gt;$.upgradebrowsers();&lt;/b&gt;" in document.ready() and you are done.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(function(){
       $.upgradebrowsers();
});
&lt;/pre&gt;To view this demo, please test it in IE 6 or Safari 3 or Firefox 2.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/8kUQy/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/8kUQy/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;When someone visits your site, UpgradeBrowsers detects and verifies the browser version that is less than the default version or the configured version (when you change the 'versions') and if less then shows the alert to upgrade your browser.&lt;br /&gt;
&lt;br /&gt;
This plugin comes in 2 version (development and minified). You can use development version if you want to change configuration settings for browser detection as per your requirement. Basically, you can control or tell which browser to consider as outdated browser.&lt;br /&gt;
&lt;br /&gt;
Also read "&lt;a href="http://jquerybyexample.blogspot.com/2011/03/always-minimize-or-minify-your.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Always Minimize or Minify your JavaScript Code&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
Visit official &lt;a href="http://upgradebrowsers.com/"&gt;website&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1926200453574129797?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1926200453574129797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/alert-your-website-visitors-when-they.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1926200453574129797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1926200453574129797'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/06/alert-your-website-visitors-when-they.html' title='Alert your website visitors when they are using an outdated browser using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-rCs08TbTGS8/TfXnKCuh3BI/AAAAAAAABdY/_4ysBShE5j4/s72-c/Upgrade.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6644740510767066477</id><published>2011-05-25T13:03:00.002+05:30</published><updated>2011-05-25T22:04:51.419+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Selectors'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>How to use jQuery Selectors with Examples</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To work with an element on the web page, first we need to find them. To find the html element in jQuery we use selectors. jQuery provides many selectors out of the box. Let me explain some of the very useful selectors in “how to” ways.&lt;br /&gt;
&lt;div style="background: Yellow; border: 1px solid #E6DB55; font-size: 14px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;To get more than 100 jQuery how to’s with video, click here&lt;br /&gt;
&lt;a href="http://www.itfunda.com/jquery-how-to-ebook--demo-app--video/Show/45"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;http://www.itfunda.com/jquery-how-to-ebook--demo-app--video/Show/45&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;How to select all elements of the page? - All Selector (“*”)&lt;/b&gt;&lt;br /&gt;
To select all elements of the page, we can use all selectors, for that we need to use *(asterisk symbol).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("*").css("border", "5px dashed green");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code will select all elements of the web page and apply border width as 5 pixel, style as dashed and color as green.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select a particular element having a specific class? - Class Selector (“.class”)&lt;/b&gt;&lt;br /&gt;
To select an element with a specific class, class selector can be used. We need to prefix the class name with “.” (dot).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$(".class1").css("border", "5px solid green");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code will select all elements of the web page having class as “class1” and apply css style border width as 5 pixel, style as solid and color as green.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select all elements of specific type? - Element Selector (“element”)&lt;/b&gt;&lt;br /&gt;
To select all elements of specific type, we can use element selector.  We need to use the html tag name.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("p").css("border", "5px solid green");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code will select all p (paragraph) elements of the web page and apply css style border width as 5 pixel, style as solid and color as green.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select an element having a specific id - ID Selector (“#id”)&lt;/b&gt;&lt;br /&gt;
To select an element having a specific id, id selector can be used. We need to prefix the id with “#” (hash symbol).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("#p1").css("border", "5px solid green");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code will select all html elements having id attribute as “p1” and apply css style border width as 5 pixel, style as solid and color as green.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select multiple elements at a time? Multiple Selector (“selector1, selector2, selectorN”)&lt;/b&gt;&lt;br /&gt;
To select multiple elements having different attributes, multiple selector can be used. We can mix the class selector, element selector, id selector all in this selector separated by “,” (comma).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("p.class1, #p1").css("border", "5px solid green");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code will select all paragraph (p) having class attribute set as “class1” and all html elements having id attribute as “p1” and apply css style border width as 5 pixel, style as solid and color as green.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select an element based on its attribute - Attribute Selector (element[‘attribute$=“name”]’)&lt;/b&gt;&lt;br /&gt;
To select an element based on a particular attribute value, attribute selector can be used. For example, if we have multiple textboxes on the page but we want to select all the textboxes which ends with id as “txtName”, we can use attribute selector.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$('input[id$="txtName"]').val('My data');
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code snippet will select the textboxes having id ending with “txtName” and set its value as “My data”.&lt;br /&gt;
&lt;br /&gt;
Notice that as against all other selectors, this selector is written in the single quote (‘) instead of double quote (“) however the attribute value is written in the double quote (“).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select the first child of the parent element? - First child selector&lt;/b&gt;&lt;br /&gt;
To select first child of the parent element first child selector can be used.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("#div2 p:first-child").css("background", "red");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code snippet will select the first paragraph (p) element that is inside the div element whose id is “div2” and will change the background color as red.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select last child of the parent element? – Last child selector&lt;/b&gt;&lt;br /&gt;
To select the last child of the parent element last child selector can be used.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("#div2 p:last-child").css("background", "red");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code snippet will select the last paragraph (p) element that is inside the div element whose id is “div2” and will change the background color as red.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to select a specific child of the parent element? nth child selector&lt;/b&gt;&lt;br /&gt;
To select the specific child of the parent element nth child select can be used.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
$("#div2 p:nth-child(2)").css("background", "red");
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code snippet will select the 2nd paragraph (p) element that is inside the div element whose id is “div2” and will change the background color as red.&lt;br /&gt;
&lt;div style="background: LightGreen; border: 1px solid #E6DB55; font-size: 14px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;To get more than 100 jQuery how to’s with video, click here&lt;br /&gt;
&lt;a href="http://www.itfunda.com/jquery-how-to-ebook--demo-app--video/Show/45"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;http://www.itfunda.com/jquery-how-to-ebook--demo-app--video/Show/45&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6644740510767066477?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6644740510767066477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6644740510767066477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6644740510767066477'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-examples.html' title='How to use jQuery Selectors with Examples'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-1994133309788706207</id><published>2011-05-23T14:28:00.000+05:30</published><updated>2011-06-24T11:31:54.131+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to set focus on next textbox on Enter Key using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I had already posted about "&lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-first-textbox-of.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;How to Set focus on First textbox of page using jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;", but there was a situation where I need to move to next textbox using Enter key. Normally, tab key is used to move to next text box and by default, when Enter key is pressed, the form gets submitted or it calls the default button click event. But it would be a nice feature for end-user to give him ability to move to next textbox using Enter key. &lt;br /&gt;
&lt;br /&gt;
As I always say "Not to worry, when we have jQuery". This can be done with jQuery as well. First see the jQuery code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
 $('input:text:first').focus();
    
 $('input:text').bind("keydown", function(e) {
    var n = $("input:text").length;
    if (e.which == 13) 
    { //Enter key
      e.preventDefault(); //Skip default behavior of the enter key
      var nextIndex = $('input:text').index(this) + 1;
      if(nextIndex &amp;lt; n)
        $('input:text')[nextIndex].focus();
      else
      {
        $('input:text')[nextIndex-1].blur();
        $('#btnSubmit').click();
      }
    }
  });

  $('#btnSubmit').click(function() {
     alert('Form Submitted');
  });
});
&lt;/pre&gt;&lt;b&gt;Explanation:&lt;/b&gt;&lt;br /&gt;
The document.ready() when gets executed then it first set the focus to the very first textbox of the page using "$('input:text:first').focus();". Read &lt;a href="http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-first-textbox-of.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;How to Set focus on First textbox of page using jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;. There is a keydown function which is binded to all the textbox using bind metohd. Read more about &lt;a href="http://jquerybyexample.blogspot.com/2010/06/jquery-bind-function-exampledemo.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;bind&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;. If you are using ajax, then don't use bind use live method. Read about &lt;a href="http://jquerybyexample.blogspot.com/2010/06/jquery-live-function-exampledemo.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;live&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Now, the keydown function, first find the total number of textboxes in the page. Read &lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/get-count-of-textboxes-using-jquery.html"&gt;Get total count of textboxes using jQuery&lt;/a&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var n = $("input:text").length;&lt;/pre&gt;Then, it check whether entry key is pressed If Yes, then prevent its default behavior. Take the index of next textbox and assign it to nextIndex variable.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var nextIndex = $('input:text').index(this) + 1;&lt;/pre&gt;After that it checks whether nextIndex is less than the total count of textbox. If Yes, then it sets the focus to next textbox and if not, then it removes the focus from current textbox and set for "Submit button".&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;if(nextIndex &amp;lt; n)
   $('input:text')[nextIndex].focus();
else
{
  $('input:text')[nextIndex-1].blur();
  $('#btnSubmit').click();
}
&lt;/pre&gt;Simple and really cool functionality.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/GgcL3/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/GgcL3/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-1994133309788706207?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/1994133309788706207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-next-textbox-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1994133309788706207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/1994133309788706207'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-next-textbox-on.html' title='How to set focus on next textbox on Enter Key using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4111847238248074670</id><published>2011-05-20T18:44:00.001+05:30</published><updated>2011-06-24T11:31:54.133+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Get total count of textboxes using jQuery</title><content type='html'>Today,One of my colleague asked me that how to get total number of textbox count using jQuery. This was fairly simple. You can use the length property to get count of textbox. See below jQuery code.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
    alert($("input:text").length);
});
&lt;/pre&gt;In this jQuery code, first selecting all the textbox and then taking it's length to get count of total number of textboxes.&lt;br /&gt;
&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/XkDL3/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/XkDL3/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4111847238248074670?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4111847238248074670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/get-count-of-textboxes-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4111847238248074670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4111847238248074670'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/get-count-of-textboxes-using-jquery.html' title='Get total count of textboxes using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-9081994568524469144</id><published>2011-05-19T13:22:00.000+05:30</published><updated>2011-06-24T11:31:54.134+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to Set focus on First textbox of page using jQuery</title><content type='html'>In any webpage where there are lots of input controls and you want the foucs on the first text box when the page is loaded. It is a piece of cake with jQuery. See below code.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
    $('input:text:first').focus();
});
&lt;/pre&gt;&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/jtbqX/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/jtbqX/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;But there could be one problem with this approach, if you first textbox is disabled. Well, again piece of cake with jQuery.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
    $('input[type=text]:enabled:first').focus();
});
&lt;/pre&gt;&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/b6PEq/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/b6PEq/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;Cool, isn't it. Another problem, my first textbox is not visible (display:none) then what should I do? &lt;br /&gt;
&lt;pre class='brush:javascript'&gt;&amp;lt;input type=&amp;#39;text&amp;#39; id=&amp;#39;txtFirstName&amp;#39; style=&amp;#39;display:none&amp;#39; /&amp;gt;
&lt;/pre&gt;Not to worry, as we have jQuery. :)&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
    $('input[type=text]:visible:first').focus();
});
&lt;/pre&gt;&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/jtbqX/2/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/jtbqX/2/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;The best method is to set the focus using ID of the control as you know that control is visible and it is not disabled.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
    $('#txtFirstName').focus();
});
&lt;/pre&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-9081994568524469144?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/9081994568524469144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-first-textbox-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9081994568524469144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9081994568524469144'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/how-to-set-focus-on-first-textbox-of.html' title='How to Set focus on First textbox of page using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7492640089609851597</id><published>2011-05-18T18:44:00.000+05:30</published><updated>2011-05-18T18:44:57.695+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Most Popular articles on jQuery By Example blog</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Below is a list of most popular articles on my blog and I recommend everyone to read these:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/split-function-in-jquery.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Split function in jQuery&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/05/whats-new-in-jquery-16.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What's new in jQuery 1.6&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/code-to-allow-only-numbers-in-textbox.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;jQuery code to allow only numbers in textbox&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/08/bind-vs-live-vs-delegate-function.html"&gt;bind() vs live() vs delegate() function&lt;/a&gt; &lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/implement-jqueryui-datepicker-with.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Implement jQueryUI DatePicker with ASP.NET&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/03/jquery-split-revisited.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;jQuery Split revisited&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/09/jquery-tip-how-to-get-mouse-cursor.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;How to get mouse cursor position&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jquerybyexample.blogspot.com/2011/04/how-to-load-jquery-locally-when-cdn.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;How to load jQuery locally when CDN fails&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery. I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7492640089609851597?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7492640089609851597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/most-popular-articles-on-jquery-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7492640089609851597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7492640089609851597'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/most-popular-articles-on-jquery-by.html' title='Most Popular articles on jQuery By Example blog'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2656174017925224952</id><published>2011-05-17T17:26:00.000+05:30</published><updated>2011-05-17T17:26:05.247+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Cheat Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.6'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Download jQuery 1.6 Visual Cheat pdf</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Few days back jQuery 1.6 was released and ready for the consumption. Read my articles to find out,  &lt;a href="http://jquerybyexample.blogspot.com/2011/05/whats-new-in-jquery-16.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What's new in jQuery 1.6&lt;/span&gt;&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Also read &lt;a href="http://jquerybyexample.blogspot.com/search/label/jQuery%201.6" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;my series&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; of articles for jQuery 1.6.&lt;br /&gt;
&lt;br /&gt;
Here is a download link to download the cheat sheet for jQuery 1.6.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 22px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;a href="http://woorkup.com/wp-content/uploads/2011/05/jQuery-1.6-Visual-Cheat-Sheet.pdf"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;Download PDF&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;Credit&lt;br /&gt;
&lt;a href="http://woorkup.com/2010/06/13/jquery-1-4-2-visual-cheat-sheet/"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;woorkup&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2656174017925224952?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2656174017925224952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/download-jquery-16-visual-cheat-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2656174017925224952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2656174017925224952'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/download-jquery-16-visual-cheat-pdf.html' title='Download jQuery 1.6 Visual Cheat pdf'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-489523253272776231</id><published>2011-05-14T22:44:00.000+05:30</published><updated>2011-05-14T22:44:44.466+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Selectors'/><category scheme='http://www.blogger.com/atom/ns#' term='Selectors'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery Selectors Reference List</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Selector are used to select elements and it is pretty difficult to remember about each and every selector. It would be nice, if all the selectors are placed together So they can referred quickly. I have prepared a list of mostly used selector.&lt;br /&gt;
&lt;b&gt;Simple tag, class, and id selectors&lt;/b&gt;&lt;br /&gt;
*&lt;br /&gt;
tagname&lt;br /&gt;
.classname&lt;br /&gt;
#id&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Selector combinations&lt;/b&gt;&lt;br /&gt;
A B &amp;nbsp; &amp;nbsp;B as a descendant of A&lt;br /&gt;
A &amp;gt; B B as a child of A&lt;br /&gt;
A + B B as a sibling following A&lt;br /&gt;
A ~ B B as a sibling of A&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Attribute filters&lt;/b&gt;&lt;br /&gt;
[attr] has attribute&lt;br /&gt;
[attr=val] has attribute with value val&lt;br /&gt;
[attr!=val] does not have attribute with value val&lt;br /&gt;
[attr^=val] attribute begins with val&lt;br /&gt;
[attr$=val] attribute ends with val&lt;br /&gt;
[attr*=val] attribute includes val&lt;br /&gt;
[attr~=val] attribute includes val as a word&lt;br /&gt;
[attr|=val] attribute begins with val and optional hyphen&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Element type filters&lt;/b&gt;&lt;br /&gt;
:button&lt;br /&gt;
:header&lt;br /&gt;
:password&lt;br /&gt;
:submit&lt;br /&gt;
:checkbox&lt;br /&gt;
:image&lt;br /&gt;
:radio&lt;br /&gt;
:text&lt;br /&gt;
:file&lt;br /&gt;
:input&lt;br /&gt;
:reset&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Element state filters&lt;/b&gt;&lt;br /&gt;
:animated&lt;br /&gt;
:disabled&lt;br /&gt;
:hidden&lt;br /&gt;
:visible&lt;br /&gt;
:checked&lt;br /&gt;
:enabled&lt;br /&gt;
:selected&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Selection position filters&lt;/b&gt;&lt;br /&gt;
:eq(n)&lt;br /&gt;
:first&lt;br /&gt;
:last&lt;br /&gt;
:nth(n)&lt;br /&gt;
:even&lt;br /&gt;
:odd&lt;br /&gt;
:gt(n)&lt;br /&gt;
:lt(n)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Document position filters&lt;/b&gt;&lt;br /&gt;
:first-child&lt;br /&gt;
:last-child&lt;br /&gt;
:only-child&lt;br /&gt;
:nth-child(xn+y)&lt;br /&gt;
:nth-child(n)&lt;br /&gt;
:nth-child(even)&lt;br /&gt;
:nth-child(odd)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Miscellaneous filters&lt;/b&gt;&lt;br /&gt;
:contains(text)&lt;br /&gt;
:not(selector)&lt;br /&gt;
:empty&lt;br /&gt;
:parent&lt;br /&gt;
:has(selector)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-489523253272776231?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/489523253272776231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-reference-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/489523253272776231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/489523253272776231'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/jquery-selectors-reference-list.html' title='jQuery Selectors Reference List'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4719872186492317477</id><published>2011-05-06T15:54:00.000+05:30</published><updated>2011-06-24T11:31:54.135+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.6'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Use Relative CSS with jQuery 1.6</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I had already posted about "&lt;a href="http://jquerybyexample.blogspot.com/2011/05/whats-new-in-jquery-16.html"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;What's new in jQuery 1.6&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;" and "&lt;a href="http://jquerybyexample.blogspot.com/2011/05/jqueryholdready-new-in-jquery-16.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;jQuery.holdReady() New in jQuery 1.6&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;".With jQuery 1.6, you can take advantage of Relative CSS. When I say relative, that means that you can update existing CSS value using relative values. For example, the width of the div element is 500px and you want to update it to 600. Then with 1.6, you can simply say "+=100px".&lt;br /&gt;
&lt;pre class="brush:javascript"&gt; $(document).ready(function() {
   $('#dvExample').css('width','350px');
    $('#btnWidth').click(function() {
       $('#dvExample').css('width','+=100px'); 
    });
});
&lt;/pre&gt;Initially, the width of the div is set to 350px and on click of button, its width is increased by 100px.You need to use "+=" and "-=" as prefix to update the existing value with the relative values. With every click on the button, it will increase the width by 100px.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/tQfTQ/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/tQfTQ/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4719872186492317477?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4719872186492317477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/use-relative-css-with-jquery-16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4719872186492317477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4719872186492317477'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/use-relative-css-with-jquery-16.html' title='Use Relative CSS with jQuery 1.6'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4332103535290595623</id><published>2011-05-05T14:27:00.000+05:30</published><updated>2011-05-05T14:27:32.189+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.6'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>jQuery.holdReady() New in jQuery 1.6</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;With Release of &lt;a href="http://jquerybyexample.blogspot.com/2011/05/whats-new-in-jquery-16.html"&gt;jQuery 1.6&lt;/a&gt;, jQuery team has released a new method "jQuery.holdReady(hold)". This method allows to delay the execution of document.ready() event. document.ready() event is called as soon as your DOM is ready but sometimes there is a situation when you want to load additional JavaScript or some plugins which you have referenced. In such situation, You can make a call to this function to delay execution of document.ready() event.&lt;br /&gt;
&lt;br /&gt;
This method must be called before document.ready() event. Calling this method after the ready event has already fired will have no effect.The best place to call is after you reference the jQuery.js in your script tag. When true is passed as argument, then it will delay the execution. When you want ready event to get executed then call "jQuery.holdReady(false)".&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$.holdReady(true);
$.getScript("myplugin.js", function() {
     $.holdReady(false);
});
&lt;/pre&gt;Note that multiple holds can be put on the ready event, one for each $.holdReady(true) call. The ready event will not actually fire until all holds have been released with a corresponding $.holdReady(false) and the normal document ready conditions are met.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4332103535290595623?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4332103535290595623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/jqueryholdready-new-in-jquery-16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4332103535290595623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4332103535290595623'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/jqueryholdready-new-in-jquery-16.html' title='jQuery.holdReady() New in jQuery 1.6'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-9162214151741824657</id><published>2011-05-04T16:54:00.000+05:30</published><updated>2011-05-04T16:54:33.827+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Submit your ideas for jQuery 1.7</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Have you ever thought that it would have been better if this feature is supported by jQuery. Well, the wait is over. jQuery core development team is now taking proposal. You can submit your proposal and they will discuss and take the final call. If selected, then it will be included in jQuery 1.7 which is probably released in August.&lt;br /&gt;
&lt;br /&gt;
Submit your proposal &lt;a href="https://spreadsheets.google.com/viewform?hl=en&amp;amp;authkey=CPmgicsO&amp;amp;formkey=dG0yTEs2ZTFWQUhDRUp5dzRyc3NwV2c6MA#gid=0"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;here&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-9162214151741824657?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/9162214151741824657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/submit-your-ideas-for-jquery-17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9162214151741824657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/9162214151741824657'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/submit-your-ideas-for-jquery-17.html' title='Submit your ideas for jQuery 1.7'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2618553371864178142</id><published>2011-05-04T16:21:00.003+05:30</published><updated>2011-05-06T12:14:37.794+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery 1.6'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>What's new in jQuery 1.6</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Well, jQuery 1.6 is now live and available for consumption!&amp;nbsp;You can get the code from the jQuery CDN:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://code.jquery.com/jquery-1.6.js" target="_blank"&gt;http://code.jquery.com/jquery-1.6.js&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.jquery.com/jquery-1.6.min.js" target="_blank"&gt;http://code.jquery.com/jquery-1.6.min.js&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can also get the code from other CDNs as well:&lt;br /&gt;
Microsoft: &lt;a href="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.min.js" target="_blank"&gt;http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.min.js&lt;/a&gt;&lt;br /&gt;
(Google is still uploading their copy.)&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;Read "&lt;a href="http://jquerybyexample.blogspot.com/2011/04/how-to-always-reference-latest-version.html"&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;&lt;b&gt;How to always reference latest version of jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;".&lt;/div&gt;Along with some bug fixes, some new features are introduces in this release. These are&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Case-mapping of data- attributes&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
jQuery 1.5 introduced a feature in the .data() method to automatically import any data- attributes that were set on the element and convert them to JavaScript values using JSON semantics. In jQuery 1.6 they have updated this feature to match the W3C HTML5 spec with regards to camel-casing data attributes that have embedded dashes. So for example in jQuery 1.5.2, an attribute of data-max-value="15" would create a data object of { max-value: 15 } but as of jQuery 1.6 it sets { maxValue: 15 }.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;.prop(), .removeProp(), and .attr()&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
In the 1.6 release they’ve split apart the handling of DOM attributes and DOM properties into separate methods. The new .prop() method sets or gets properties on DOM elements, and .removeProp() removes properties. In the past, jQuery has not drawn a clear line between properties and attributes. Generally, DOM attributes represent the state of DOM information as retrieved from the document, such as the value attribute in the markup &amp;lt;input type="text" value="abc" /&amp;gt;. DOM properties represent the dynamic state of the document; for example if the user clicks in the input element above and types def the .prop("value") is abcdef but the .attr("value") remains abc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Boolean Attributes&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
In jQuery 1.6 Boolean attributes (such as selected, checked, etc.) can now be toggled by passing in true or false to .attr() to either add or remove them. For example:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#checkbox").attr("checked", true); // Checks it
$("#checkbox").attr("checked", false); // Unchecks it
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;jQuery.holdReady()&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
jQuery provides a mechanism for delaying the execution of the ready event (primarily for plugin authors). The API for this mechanism has been improved in 1.6, resulting in a single, simple, method:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;jQuery.holdReady( true ); // Pause execution of ready event
// later...
jQuery.holdReady( false ); // Resume execution
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;:focus Selector&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
In jQuery 1.6, it is ensured that the :focus selector works properly across all browsers. You can use this selector to find the currently focused element on the page (such as a form input).&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("input:focus").addClass("active");&lt;/pre&gt;You can find the complete list of jQuery 1.6 API changes&lt;br /&gt;
&lt;a href="http://api.jquery.com/category/version/1.6/" target="_blank"&gt;http://api.jquery.com/category/version/1.6/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2618553371864178142?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2618553371864178142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/whats-new-in-jquery-16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2618553371864178142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2618553371864178142'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/05/whats-new-in-jquery-16.html' title='What&apos;s new in jQuery 1.6'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4628986258678963778</id><published>2011-04-30T14:28:00.000+05:30</published><updated>2011-04-30T14:28:19.901+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>How to always reference latest version of jQuery</title><content type='html'>As you are aware that already many version of jQuery is released and the latest version is 1.5.2. And jQuery 1.6 is around the corner. When you are referencing the jQuery from CDN then you need to specify the version number as well so that version gets loaded.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;
src=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&amp;quot;&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;Above code will load jQuery 1.5.1 from Google CDN. But it would be nice if always latest version is referred irrespective of new version is released and you don't have to modify the jQuery referencing code.&lt;br /&gt;
&lt;br /&gt;
Well,jQuery.com is also one of the CDN where jQuery is hosted. You can always refer to the latest version of jQuery.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;
src=&amp;quot;http://code.jquery.com/jquery-latest.min.js&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;This will always load the latest version of jQuery. Currently it refers to 1.5.2 and in future if 1.6 is released then it will load 1.6. Cool...&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4628986258678963778?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4628986258678963778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/how-to-always-reference-latest-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4628986258678963778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4628986258678963778'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/how-to-always-reference-latest-version.html' title='How to always reference latest version of jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-8178598026419364124</id><published>2011-04-29T18:02:00.000+05:30</published><updated>2011-06-24T11:31:54.136+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>How to load jQuery locally when CDN fails</title><content type='html'>There are couple of advantage if you load your jQuery from any CDN. Read my post about "&lt;a href="http://jquerybyexample.blogspot.com/2010/08/jquery-tip-always-load-your-jquery.html" target="_blank"&gt;jQuery Tip : Always load your jQuery framework from CDN&lt;/a&gt;". It is a good approach to always use CDN but sometimes what if the CDN is down (rare possibility though) but you never know in this world as anything can happen. So if you have loaded your jQuery from any CDN and it went down then your jQuery code will stop working and your client will start shouting.&lt;br /&gt;
&lt;br /&gt;
Hang on, there is a solution for this as well. Below given jQuery code checks whether jQuery is loaded from Google CDN or not, if not then it references the jQuery.js file from your folder.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
if (typeof jQuery == &amp;#39;undefined&amp;#39;)
{
  document.write(unescape(&amp;quot;%3Cscript src=&amp;#39;Scripts/jquery.1.5.1.min.js&amp;#39; type=&amp;#39;text/javascript&amp;#39;%3E%3C/script%3E&amp;quot;));
}
&amp;lt;/script&amp;gt;&lt;/pre&gt;It first loads the jQuery from Google CDN and then check the jQuery object. If jQuery is not loaded successfully then it will references the jQuery.js file from hard drive location. In this example, the jQuery.js is loaded from Scripts folder.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-8178598026419364124?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/8178598026419364124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/how-to-load-jquery-locally-when-cdn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8178598026419364124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/8178598026419364124'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/how-to-load-jquery-locally-when-cdn.html' title='How to load jQuery locally when CDN fails'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-2011460936927824214</id><published>2011-04-23T16:53:00.000+05:30</published><updated>2012-02-17T09:48:46.260+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Validate email address using jQuery</title><content type='html'>This is a very basic functionality to &lt;b&gt;validate the email address&lt;/b&gt;. In this post, I will show you how to &lt;b&gt;validate&lt;/b&gt; the &lt;b&gt;email address&lt;/b&gt; using &lt;b&gt;jQuery&lt;/b&gt;. To validate the email address, I have created a separate function which based on email address, returns true or false. Email address validation is done using regular expression.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;function validateEmail(txtEmail){
   var a = document.getElementById(txtEmail).value;
   var filter = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{1,4}$/;
    if(filter.test(a)){
        return true;
    }
    else{
        return false;
    }
}
&lt;/pre&gt;One just need to make a call to this function to validate the email address. For demo, I have used on blur event of textbox. But It can be used on click on button or any another event.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
  $('#txtEmail').blur(function() {
      if(validateEmail('txtEmail'))
      {
          alert('Email is valid');
      }
      else
      {
          alert('Invalid Email Address');
      }
   });
});
&lt;/pre&gt;&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/FDMzf/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/FDMzf/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; font-size:20px;display:none;"&gt;Previous latest  &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/PUkXV/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/DxPuU/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
Previous  &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/DxPuU/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/DxPuU/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-2011460936927824214?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/2011460936927824214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/validate-email-address-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2011460936927824214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/2011460936927824214'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/validate-email-address-using-jquery.html' title='Validate email address using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-5342553967664996327</id><published>2011-04-18T12:58:00.000+05:30</published><updated>2011-06-24T11:31:54.139+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Find which mouse button clicked using jQuery</title><content type='html'>For one of my requirement, I need to determine which mouse button (Left, Middle or Right) was clicked. jQuery provides mousedown() event, using which we can check which mouse button is clicked. For key or button events, event attribute indicates the specific button or key that was pressed. event.which will give 1, 2 or 3 for left, middle and right mouse buttons respectively. The advantage of using event.which is that it eliminates cross browser compatibility.&lt;br /&gt;
&lt;pre class='brush:javascript'&gt;$(document).ready(function() {
$('#btnClick').mousedown(function(event){
    switch (event.which) {
        case 1:
            alert('Left mouse button pressed');
            break;
        case 2:
            alert('Middle mouse button pressed');
            break;
        case 3:
            alert('Right mouse button pressed');
            break;
        default:
           break;
    }
});
});
&lt;/pre&gt;&lt;div style="border:1px solid #E6DB55;background:#FFFFE0; margin:16px 0; padding: 5px 0 5px 10px; font-size:20px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/5fmch/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/5fmch/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-5342553967664996327?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/5342553967664996327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/find-which-mouse-button-clicked-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5342553967664996327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/5342553967664996327'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/find-which-mouse-button-clicked-using.html' title='Find which mouse button clicked using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4274903068080768017</id><published>2011-04-17T11:01:00.001+05:30</published><updated>2011-06-24T11:31:54.140+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>Restrict Shift Key using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There is a very basic requirement of restrict numbers in a textbox And we implement the code to restrict other characters than 0 to 9. But there is a loop hole that sometimes not checked, that is using Shift Key and number key combination, user can still type special characters like @,#,$ etc.Below jQuery code detects how to restrict or disable Shift Key.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function(){ 
$("#txtNumbers").keydown(function(event) {
     if(event.shiftKey)
     {
        alert('You have pressed Shift Key.');
        event.preventDefault();
     }
   });
});
&lt;/pre&gt;&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;See live &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/kr84X/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Demo&lt;/span&gt;&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://jsfiddle.net/jquerybyexample/kr84X/" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Code&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;.   &lt;/div&gt;Above code uses keydown event to track shift key, if you use same method in keyPress event, then it will not work. The difference between keydown() and keypress() is that if the user repeats any key by pressing and holding a key, the keydown() event is executed only once whereas the keypress() event isexecuted for each inserted character. Also, the modifier keys Shift, Ctrl, etc. are recognized by keydown(), but keypress() is not fired by these modifier keys.&lt;br /&gt;
&lt;br /&gt;
Read my other post that allows only number&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/code-to-allow-only-numbers-in-textbox.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;b&gt;jQuery code to allow only numbers in textbox&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4274903068080768017?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4274903068080768017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/restrict-shift-key-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4274903068080768017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4274903068080768017'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/restrict-shift-key-using-jquery.html' title='Restrict Shift Key using jQuery'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-6249627589601535251</id><published>2011-04-05T17:42:00.001+05:30</published><updated>2011-06-24T11:31:54.141+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery With ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>jQuery to Retrieve Server's current date and time with ASP.NET</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In this post, we will see how to retrieve server's current date and time without using ajax. It's very simple and one line of ASP.NET code can help you to retrieve the server's current date &amp;amp; time. For demo, I have placed a textbox and will fetch the Server's date and time and display it in Textbox. &lt;br /&gt;
&lt;pre class="brush:javascript"&gt;&amp;lt;asp:TextBox ID="txtValue" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
&lt;/pre&gt;See below jQuery code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
$('#txtValue').val('&amp;lt;%=(System.DateTime.Now).ToString()%&amp;gt;');
});
&lt;/pre&gt;It is just a simple ASP.NET code, which we normally write in code behind file.Above code will provide date and time both. If you want to fetch only time, then modify the above jQuery code to below code.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ready(function() {
$('#txtValue').val('&amp;lt;%=System.DateTime.Now.ToShortTimeString()%&amp;gt;');
});
&lt;/pre&gt;You can also fetch only the Year, month, day, hours, minutes or seconds. For example, to fetch hours,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#txtValue').val('&amp;lt;%=(System.DateTime.Now.Hour).ToString()%&amp;gt;');
&lt;/pre&gt;To fetch only minutes,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$('#txtValue').val('&amp;lt;%=(System.DateTime.Now.Minute).ToString()%&amp;gt;');
&lt;/pre&gt;Read more about DateTime.Now on &lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.datetime.now.aspx" target="_blank"&gt;MSDN&lt;/a&gt; &lt;/span&gt;and find out what more you can achieve using this property.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-6249627589601535251?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/6249627589601535251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/jquery-to-retrieve-servers-current-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6249627589601535251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/6249627589601535251'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/04/jquery-to-retrieve-servers-current-date.html' title='jQuery to Retrieve Server&apos;s current date and time with ASP.NET'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-4300992851954750129</id><published>2011-03-30T12:41:00.001+05:30</published><updated>2011-12-22T21:48:19.849+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='Jquery Code Snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery Code Examples'/><title type='text'>jQuery Split revisited</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I had already posted about "&lt;a href="http://jquerybyexample.blogspot.com/2010/06/split-function-in-jquery.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Split function in jQuery&lt;/span&gt;&lt;/a&gt;", which is used to split any string with specified delimiter. Please read &lt;a href="http://jquerybyexample.blogspot.com/2010/06/split-function-in-jquery.html"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;this &lt;/span&gt;&lt;/a&gt;post before you proceed.&lt;br /&gt;
&lt;br /&gt;
Split method split the string into array of substring and return a new array. The basic syntax for split method is,&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;string.split(separator, limit)
&lt;/pre&gt;It takes 2 parameters,&lt;br /&gt;
1. separator - This is optional. It specifies the character to use for splitting the string. If omitted, the entire string will be returned.&lt;br /&gt;
2. limit - This is also optional. This will be an integer value that specifies the number of splits to be made.&lt;br /&gt;
&lt;br /&gt;
Let's see some examples.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example 1:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var element = 'jQuery By Example Rocks!!';
var arrayOfStrings = element.split();
&lt;/pre&gt;In this example, I have not used any separator and not defined any element. So the whole string will be returned back to arrayOfStrings variable.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example 2:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var element = 'jQuery By Example Rocks!!';
var arrayOfStrings = element.split(" ");
&lt;/pre&gt;In this example, I have passed space as delimiter or separator to split the string. So arrayOfStrings variable will have 4 items.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;arrayOfStrings[0] = "jQuery"
arrayOfStrings[1] = "By"
arrayOfStrings[2] = "Example"
arrayOfStrings[3] = "Rocks!"
&lt;/pre&gt;&lt;b&gt;Example 3:&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var element = 'jQuery By Example Rocks!!';
var arrayOfStrings = element.split(" ",3);
&lt;/pre&gt;In this example, I have passed space as delimiter or separator to split the string and also passed limit as 3. So arrayOfStrings variable will have only 3 items.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;arrayOfStrings[0] = "jQuery"
arrayOfStrings[1] = "By"
arrayOfStrings[2] = "Example"
&lt;/pre&gt;Hope this post provides you enough information about Split method.&lt;br /&gt;
&lt;br /&gt;
Read my other helpful posts:&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 16px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;a href="http://jquerybyexample.blogspot.com/2010/06/disableenable-element-using-jquery.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;&lt;b&gt;Disable/Enable an element using jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://jquerybyexample.blogspot.com/2010/10/jquery-code-to-disable-enable-all.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;&lt;b&gt;Disable-Enable all controls of page using jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://jquerybyexample.blogspot.com/2010/10/jquery-code-to-enable-and-disable-all.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #cc0000;"&gt;&lt;b&gt;Enable/Disable all text boxes using jQuery&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-4300992851954750129?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/4300992851954750129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/03/jquery-split-revisited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4300992851954750129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/4300992851954750129'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/03/jquery-split-revisited.html' title='jQuery Split revisited'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7148860988886047724.post-7144029158447470680</id><published>2011-03-28T14:36:00.003+05:30</published><updated>2011-04-15T14:32:51.212+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery docs'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery documentation'/><title type='text'>Download jQuery 1.4 docs</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Well, good news. Now you don't need to go online if you want to see the jQuery docs.&lt;br /&gt;
&lt;br /&gt;
Thanks to &lt;a href="http://charupload.wordpress.com/" target="_blank"&gt;charupload.wordpress.com&lt;/a&gt; for compiling this into chm.&lt;br /&gt;
&lt;div style="background: #FFFFE0; border: 1px solid #E6DB55; font-size: 20px; margin: 16px 0; padding: 5px 0 5px 10px;"&gt;&lt;a href="http://www.mediafire.com/?mgmrt0ehzyz" target="_blank"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;Download jQuery doc in CHM&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;i&gt;Feel free to contact me for any help related to jQuery, I will gladly help you.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7148860988886047724-7144029158447470680?l=jquerybyexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jquerybyexample.blogspot.com/feeds/7144029158447470680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jquerybyexample.blogspot.com/2011/03/download-jquery-14-documentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7144029158447470680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7148860988886047724/posts/default/7144029158447470680'/><link rel='alternate' type='text/html' href='http://jquerybyexample.blogspot.com/2011/03/download-jquery-14-documentation.html' title='Download jQuery 1.4 docs'/><author><name>Virendra Dugar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
