<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4624294245286004140</atom:id><lastBuildDate>Fri, 08 Nov 2024 15:52:52 +0000</lastBuildDate><category>Google</category><category>jQuery</category><category>javascript</category><category>blogger.com</category><category>google cloud print</category><category>php</category><category>CDN</category><category>Google ClientLogin</category><category>Fancybox</category><category>Google Cloud Print Interface</category><category>plugins</category><category>printing</category><category>scrollTop</category><title>Scoobler - Life in code</title><description>Hints &amp;amp; Tips I want to share...</description><link>http://scoobler.blogspot.com/</link><managingEditor>noreply@blogger.com (Scoobler)</managingEditor><generator>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-3049328972578785778</guid><pubDate>Sat, 07 Jan 2012 20:48:00 +0000</pubDate><atom:updated>2012-01-24T22:47:39.687+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">Google ClientLogin</category><category domain="http://www.blogger.com/atom/ns#">google cloud print</category><category domain="http://www.blogger.com/atom/ns#">Google Cloud Print Interface</category><category domain="http://www.blogger.com/atom/ns#">php</category><title>PHP to Paper.......... Getting a list of Printers</title><description>If you&#39;ve read the first part of this little series of posts, you&#39;ll know the aim is to allow a &lt;a class=&quot;inlineLink&quot; href=&quot;http://scoobler.blogspot.com/2011/12/php-to-paperthe-introduction-to.html&quot;&gt;PHP web app to print&lt;/a&gt;, the web app has just &lt;a class=&quot;inlineLink&quot; href=&quot;http://scoobler.blogspot.com/2011/12/php-to-paperwhere-to-start.html&quot;&gt;Authenticated with Google&lt;/a&gt; and is now ready to start working with the Google Cloud Print Interfaces.&lt;br /&gt;
&lt;br /&gt;
In this post, we&#39;ll take the next step to get things up and running, getting a list of the users printers, so we have the needed ID to send print jobs to.&lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;div&gt;
This is really the first stage, really getting stuck into the &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt; service. When you add a printer to your &lt;a href=&quot;http://www.google.com/cloudprint#printers&quot; target=&quot;_blank&quot;&gt;Google Cloud Print Manager&lt;/a&gt;&lt;i&gt; (using the user details which the web app is getting the &lt;a class=&quot;inlineLink&quot; href=&quot;http://scoobler.blogspot.com/2011/12/php-to-paperwhere-to-start.html&quot;&gt;Authentication Token&lt;/a&gt; for)&lt;/i&gt;&amp;nbsp;it is given an ID which up till this point is kept hidden but the system will need it.&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b&gt;&lt;i&gt;HINT:&lt;/i&gt;&lt;/b&gt; To help things out down the line, I would strongly suggest, whenever you add a printer to the &lt;a href=&quot;http://www.google.com/cloudprint#printers&quot; target=&quot;_blank&quot;&gt;Google Cloud Print Manager&lt;/a&gt; you &lt;u&gt;&lt;b&gt;rename&lt;/b&gt;&lt;/u&gt; it to something nice and friendly - you&#39;ll see why shortly.&lt;/blockquote&gt;
&lt;div&gt;
Ok now for a little bit of code. We will start with setting up the &lt;a href=&quot;http://framework.zend.com/manual/1.0/en/zend.http.client.html&quot; target=&quot;_blank&quot;&gt;client object&lt;/a&gt; which will be used for communicating with the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/appInterfaces.html&quot; target=&quot;_blank&quot;&gt;interfaces&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;// Google User Email:
$G_Email = &quot;your_google_acount@googlemail.com&quot;;
// Google User Password:
$G_Pass = &quot;your_google_acount_password&quot;;
// Create a Gdata client for the Google Cloud Print service:
$client = Zend_Gdata_ClientLogin::getHttpClient($G_Email, $G_Pass, &#39;cloudprint&#39;);&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
You&#39;ll notice, this is the same object we used when we got the &lt;a href=&quot;http://scoobler.blogspot.com/2011/12/php-to-paperwhere-to-start.html&quot; target=&quot;_blank&quot;&gt;authentication token&lt;/a&gt;. But we now need to add the following two lines, these need to be present for the&amp;nbsp;&lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt;&amp;nbsp;servers to interact with us.:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;// Add the hadders to the Client:
$client-&amp;gt;setHeaders(&#39;Authorization&#39;,&#39;GoogleLogin auth=&#39;.$Client_Login_Token);
$client-&amp;gt;setHeaders(&#39;X-CloudPrint-Proxy&#39;,&#39;a-name-for-your-system&#39;);
&lt;/pre&gt;
&lt;br /&gt;
Now that&#39;s done, we are ready to start using the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/appInterfaces.html&quot; target=&quot;_blank&quot;&gt;interfaces&lt;/a&gt;. The next step towards being able to print, is getting a list of the printers which the user account can use. You need this list to get hold of the &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; appointed ID for the printer you want to use.&amp;nbsp;To get the list we need to use the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/appInterfaces.html#search&quot; target=&quot;_blank&quot;&gt;&lt;u&gt;&lt;b&gt;search&lt;/b&gt;&lt;/u&gt; interface&lt;/a&gt;. The request will return a &lt;a href=&quot;http://www.json.org/javadoc/org/json/JSONObject.html&quot; target=&quot;_blank&quot;&gt;JSON object&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;// GCP Interface to list printers:
$client-&amp;gt;setUri(&#39;http://www.google.com/cloudprint/interface/search?output=json&#39;);
// Request the list of printers:
$response = $client-&amp;gt;request(Zend_Http_Client::POST);&lt;/pre&gt;
&lt;br /&gt;
We can now perform a quick test on the object to see if there was an authentication error for example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;// Test the response for an auth error:
if ($response-&amp;gt;getStatus() == 403) {
    // Handle the error here.........
}&lt;/pre&gt;
&lt;br /&gt;
Now we have the &lt;a href=&quot;http://www.json.org/javadoc/org/json/JSONObject.html&quot; target=&quot;_blank&quot;&gt;JSON object&lt;/a&gt; which contains a couple of details of each of the users printers we can decode it into a &lt;a href=&quot;http://php.net/manual/en/language.types.array.php&quot; target=&quot;_blank&quot;&gt;PHP Array&lt;/a&gt; and we have our list. If however you wanted to allow your user to select a printer to use, you could process the array a little to make it easier to work with, and make it a little more user friendly for your user:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;// Decode the result:
$result = json_decode($response-&amp;gt;getBody(), true);
// Store an array of printers:
$printerList = array();
// Loop through the printers and to get capabilities:
foreach ($result[&#39;printers&#39;] as $printer) {
    // Store details about this printer:
    $currentPrinter = array();
    // Store the printers ID:
    $currentPrinter[&#39;id&#39;] = &amp;nbsp;$printer[&#39;id&#39;];
    // Try getting the display name, else get the default name:
    $currentPrinter[&#39;name&#39;] = (empty($printer[&#39;displayName&#39;]))?$printer[&#39;name&#39;]:$printer[&#39;displayName&#39;];
    // Add this printer to the overall list:
    $printerList[] = $currentPrinter;
}&lt;/pre&gt;
&lt;br /&gt;
Now remember above I said rename your printer in the &lt;a href=&quot;http://www.google.com/cloudprint#printers&quot; target=&quot;_blank&quot;&gt;Google Cloud Print Manager&lt;/a&gt;, if you did your user will see a user friendly name, if you didn&#39;t, they will get the generic printer name, normally its make and model.&lt;br /&gt;
&lt;br /&gt;
So up to now we have:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://scoobler.blogspot.com/2011/12/php-to-paperwhere-to-start.html&quot; target=&quot;_blank&quot;&gt;The Authentication Token&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://scoobler.blogspot.com/2012/01/php-to-paper-getting-list-of-printers.html&quot; target=&quot;_blank&quot;&gt;A client setup to work with the Google Cloud Print Interfaces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://scoobler.blogspot.com/2012/01/php-to-paper-getting-list-of-printers.html&quot; target=&quot;_blank&quot;&gt;A list of printers which can be used, which, most importantly has the printers ID&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
The next step is......sending though something to print!&lt;/div&gt;</description><link>http://scoobler.blogspot.com/2012/01/php-to-paper-getting-list-of-printers.html</link><author>noreply@blogger.com (Scoobler)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-345673470644000729</guid><pubDate>Thu, 29 Dec 2011 23:48:00 +0000</pubDate><atom:updated>2011-12-30T17:49:40.777+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">Google ClientLogin</category><category domain="http://www.blogger.com/atom/ns#">google cloud print</category><category domain="http://www.blogger.com/atom/ns#">php</category><title>PHP to Paper.......... Where to Start - Authenticating with Google</title><description>&lt;a href=&quot;http://scoobler.blogspot.com/2011/12/php-to-paperthe-introduction-to.html&quot; target=&quot;_blank&quot;&gt;After being tasked&lt;/a&gt; with getting a &lt;a href=&quot;http://en.wikipedia.org/wiki/PHP&quot; target=&quot;_blank&quot;&gt;PHP&lt;/a&gt; web application to print for itself, and deciding &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt; was looking like the best solution, I set about finding the solution to my problem.&lt;br /&gt;
&lt;br /&gt;
After reading the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/overview.html&quot; target=&quot;_blank&quot;&gt;official doc&#39;s&lt;/a&gt; and deciding either this really isn&#39;t how &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; currently intended for the service to be used or they really just hadn&#39;t had chance to put much into the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/overview.html&quot; target=&quot;_blank&quot;&gt;doc&#39;s&lt;/a&gt; I widened my search.&lt;br /&gt;
I came across a very useful chap called &lt;a href=&quot;http://www.kinlane.com/&quot; target=&quot;_blank&quot;&gt;Kin Lane&lt;/a&gt;, he has made some &lt;a href=&quot;http://www.kinlane.com/category/google/google-cloud-print-services-interface/&quot; target=&quot;_blank&quot;&gt;excellent blog posts&lt;/a&gt; on the subject and turns out he works in the field of printing. After a quick email and him agreeing that I *should* be able to&amp;nbsp;achieve&amp;nbsp;what I wanted with &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt;, I set about solving my puzzle.&lt;br /&gt;
&lt;br /&gt;
At the time of writing this, there is very little in the way of code examples using &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt;, in fact the only one I had found focusing on submitting a job was&amp;nbsp;&lt;a href=&quot;http://pastie.org/2060608/wrap&quot; target=&quot;_blank&quot;&gt;this sample&lt;/a&gt;. This however left some questions to which I found no useful answers!&lt;br /&gt;
&lt;br /&gt;
To start with, &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; have provided &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/appInterfaces.html&quot; target=&quot;_blank&quot;&gt;some interfaces&lt;/a&gt; for working with the service. &lt;a href=&quot;http://www.kinlane.com/&quot; target=&quot;_blank&quot;&gt;Kin Lane&lt;/a&gt; has covered connecting to some &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/proxyinterfaces.html&quot; target=&quot;_blank&quot;&gt;these services&lt;/a&gt;&amp;nbsp;&lt;i&gt;(receiving print jobs, rather than submitting print jobs, but it was a very good jump start)&lt;/i&gt;&amp;nbsp;with &lt;a href=&quot;http://en.wikipedia.org/wiki/PHP&quot; target=&quot;_blank&quot;&gt;PHP&lt;/a&gt; on &lt;a href=&quot;http://www.kinlane.com/&quot; target=&quot;_blank&quot;&gt;his blog&lt;/a&gt;. The solution focuses on the use of the &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_blank&quot;&gt;Zend Framework&lt;/a&gt;, which was handy with it being the&lt;a href=&quot;http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#PHP&quot; target=&quot;_blank&quot;&gt; framework&lt;/a&gt; the web app uses!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The Pseudo Answer:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The web app has a dedicated Google user account &lt;i&gt;(in my case, this is one of the&amp;nbsp;&lt;a href=&quot;http://www.google.com/apps/intl/en/business/index.html&quot; target=&quot;_blank&quot;&gt;Google App&lt;/a&gt; accounts which is a group email address)&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Setup some printers for the user account as &lt;a href=&quot;http://www.google.com/cloudprint/learn/printers.html#setup-hp#setup-kodak#setup-epson&quot; target=&quot;_blank&quot;&gt;described here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The system requests an &lt;a href=&quot;http://code.google.com/apis/accounts/index.html&quot; target=&quot;_blank&quot;&gt;Authentication&amp;nbsp;Token&lt;/a&gt; from &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; to allow use of the service.&lt;/li&gt;
&lt;li&gt;The system can now access the printers and use the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/appInterfaces.html&quot; target=&quot;_blank&quot;&gt;interfaces&lt;/a&gt;.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;The system can now get a list of printers, and&lt;/li&gt;
&lt;li&gt;The system can now submit jobs to be printed!&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;The Start of the Real Answer:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
After setting up the printers for a user account, as &lt;a href=&quot;http://www.google.com/cloudprint/learn/printers.html#setup-hp#setup-kodak#setup-epson&quot; target=&quot;_blank&quot;&gt;described here&lt;/a&gt;.&lt;br /&gt;
The first step the system needs to take is getting an &lt;a href=&quot;http://code.google.com/apis/accounts/index.html&quot; target=&quot;_blank&quot;&gt;Authentication Token&lt;/a&gt; from &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; which allows us to use the users services, in this case, the printers you have setup.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;// Google User Email:
$G_Email = &quot;your_google_acount@googlemail.com&quot;;
// Google User Password:
$G_Pass = &quot;your_google_acount_password&quot;;
// Create a Gdata client for the Google Cloud Print service:
$client = Zend_Gdata_ClientLogin::getHttpClient($G_Email, $G_Pass, &#39;cloudprint&#39;);
// Get the Authentication Token:
$Client_Login_Token = $client-&amp;gt;getClientLoginToken();
&lt;/pre&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwqXLTVaOR4y_69OJZNd3toGtLKh1DAmbZpPK2X4IdZOudtUhP1AZgUD7zL6meC-lUhDEnfHo4PtiKbxL_uUkr9N8OLal8Jrqfi3rijW4VaC8tIR7Sw3Qz1TqE-WXh25pvfyV7MY7UVBc/s1600/ClientLoginDiagram.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwqXLTVaOR4y_69OJZNd3toGtLKh1DAmbZpPK2X4IdZOudtUhP1AZgUD7zL6meC-lUhDEnfHo4PtiKbxL_uUkr9N8OLal8Jrqfi3rijW4VaC8tIR7Sw3Qz1TqE-WXh25pvfyV7MY7UVBc/s400/ClientLoginDiagram.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Picture taken from Google&lt;/span&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
You&#39;ll notice, the use of the &lt;a href=&quot;http://framework.zend.com/&quot; target=&quot;_blank&quot;&gt;Zend Framework&lt;/a&gt; makes getting the &lt;a href=&quot;http://code.google.com/apis/accounts/index.html&quot; target=&quot;_blank&quot;&gt;Authentication Token&lt;/a&gt; extremely easy, &lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;however&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;, and this is quite a big however, there is the potential &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; will deny an &lt;a href=&quot;http://code.google.com/apis/accounts/index.html&quot; target=&quot;_blank&quot;&gt;Authentication Token&lt;/a&gt;, and instead request a &lt;a href=&quot;http://www.google.com/recaptcha/captcha&quot; target=&quot;_blank&quot;&gt;captcha&lt;/a&gt; to be completed, this is covered by the &lt;a href=&quot;http://framework.zend.com/manual/en/zend.gdata.clientlogin.html&quot; target=&quot;_blank&quot;&gt;Zend Doc&#39;s&lt;/a&gt; and other guides on the web, &lt;i&gt;but I will try to come back to it later due to this causing an error for an automated system&lt;/i&gt;.&lt;br /&gt;
Another thing to note is, once &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; has served an &lt;a href=&quot;http://code.google.com/apis/accounts/index.html&quot; target=&quot;_blank&quot;&gt;Authentication Token&lt;/a&gt;, it remains valid for several days, I have read this can be anywhere from 14 days to 28 days, so to play it safe, I request a new token every 10 days to play it safe.&lt;br /&gt;
&lt;br /&gt;
In the next entry I will cover the use of the &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/appInterfaces.html&quot; target=&quot;_blank&quot;&gt;different interfaces&lt;/a&gt;&amp;nbsp;to allow us to print.</description><link>http://scoobler.blogspot.com/2011/12/php-to-paperwhere-to-start.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwqXLTVaOR4y_69OJZNd3toGtLKh1DAmbZpPK2X4IdZOudtUhP1AZgUD7zL6meC-lUhDEnfHo4PtiKbxL_uUkr9N8OLal8Jrqfi3rijW4VaC8tIR7Sw3Qz1TqE-WXh25pvfyV7MY7UVBc/s72-c/ClientLoginDiagram.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-4484892144926707806</guid><pubDate>Sat, 24 Dec 2011 01:21:00 +0000</pubDate><atom:updated>2011-12-29T00:32:40.532+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">google cloud print</category><category domain="http://www.blogger.com/atom/ns#">php</category><category domain="http://www.blogger.com/atom/ns#">printing</category><title>PHP to Paper..........The Introduction to Printing</title><description>Well I&#39;m sure if you have found this blog entry, it&#39;s not because you need to be taught how to suck eggs! I recently ran into the brick wall that is, getting a &lt;a href=&quot;http://www.php.net/&quot; target=&quot;_BLANK&quot;&gt;PHP&lt;/a&gt; web application to print directly to a printer, no user dialogs, and the printer a sitting on the opposite side of the world to the server, I&#39;m guessing if you have found this, you are looking for a solution to the very same thing.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFnBkjBNAaGSGrE7MKXC6NvnGFQzQhI53Y_UujrwqK_RSM1d9E5KB_QwZKIZfHFprOF6WUtnl0BFCRtD-eRdU-sz2BvZDzs7KPVaP0Wqu3QOUjSkOudqK18V8gcv4aPm8oQqr3YYX5-gA/s1600/print-anywhere.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;92&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFnBkjBNAaGSGrE7MKXC6NvnGFQzQhI53Y_UujrwqK_RSM1d9E5KB_QwZKIZfHFprOF6WUtnl0BFCRtD-eRdU-sz2BvZDzs7KPVaP0Wqu3QOUjSkOudqK18V8gcv4aPm8oQqr3YYX5-gA/s200/print-anywhere.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Imagine this for a situation, you run an online shop, the server is online in a far away place, the office is in one location where workers maintain the shop and your items listed, in another location is your warehouse, every day someone in your warehouse has to log in to print out a picking note and a delivery note.&lt;br /&gt;
Now how much easier would it be if every time an order came in, the printer sitting in the warehouse churned out the paperwork the minute your customer confirmed their order?!&lt;br /&gt;
&lt;br /&gt;
Well this was a challenge I had been tasked with, allowing a &lt;a href=&quot;http://www.php.net/&quot; target=&quot;_BLANK&quot;&gt;PHP&lt;/a&gt; based back office system to print, no dialogs, no questions asked. So where to start, I wanted a solution which was both simple and easy to maintain. As printers come and go, I wanted a solution that was somewhat future proof and didn&#39;t need much code work to change or add printers and the possibility of printing to more than one location.&lt;br /&gt;
&lt;br /&gt;
After a little thinking and a little bit of trawling, I kept coming back to one possibility which the more I thought about the more I thought it&#39;s got to hold the answer.&lt;br /&gt;
If you haven&#39;t heard about it yet, you soon will, the awesome giant that is &lt;a href=&quot;http://www.google.com/&quot; target=&quot;_blank&quot;&gt;Google&lt;/a&gt; have come up with an excellent new &lt;a href=&quot;http://en.wikipedia.org/wiki/Software_beta&quot; target=&quot;_blank&quot;&gt;beta product&lt;/a&gt;, its called &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt;, and while at the moment I don&#39;t really think it&#39;s intended to be an answer to the problem, the more I thought about it, the more I thought it was going to be the answer. Over the next few blog posts I am going to share my findings, and show you how I&#39;ve used &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt; to get my &lt;a href=&quot;http://www.php.net/&quot; target=&quot;_BLANK&quot;&gt;PHP&lt;/a&gt; system to print directly to my printers, that&#39;s the server &lt;i&gt;(in this case)&lt;/i&gt; stateside printing directly to a printer roughly 2500 miles away from it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So a final word to end the introduction, before I get stuck into the nitty gritty: What is &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt; I hear you ask:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;u&gt;&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Print anywhere, from any device.&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;
Google Cloud Print is a new technology that connects your printers to the web. Using Google Cloud Print, you can make your home and work printers available to you and anyone you choose, from the applications you use every day. Google Cloud Print works on your phone, tablet, Chromebook, PC, and any other web-connected device you want to print from.
&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Quoted from&amp;nbsp;&lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot;&gt;http://www.google.com/cloudprint/learn/&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKDwiOTmjb89XuAi0IhrrEjh-kj7n4BEYbkgfwsEnTFRrOx9y8PPXzTIGE3smgPoTQ2IARV-ozMFQ8pB-PJEPXaeuf0oHw42GBmvH6dA3wiR0jlMxlNkYFa1fFwFsbZjELN0gogUrck9I/s1600/cloudprint2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKDwiOTmjb89XuAi0IhrrEjh-kj7n4BEYbkgfwsEnTFRrOx9y8PPXzTIGE3smgPoTQ2IARV-ozMFQ8pB-PJEPXaeuf0oHw42GBmvH6dA3wiR0jlMxlNkYFa1fFwFsbZjELN0gogUrck9I/s400/cloudprint2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;i&gt;A diagram showing the workflow of Google Cloud Print&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Looking for the official help? &lt;a href=&quot;http://code.google.com/intl/en/apis/cloudprint/docs/overview.html&quot; target=&quot;_blank&quot;&gt;Click Here&lt;/a&gt; for the developers doc&#39;s, but be warned as at the time of writing this, the doc&#39;s are somewhat limited due to &lt;a href=&quot;http://www.google.com/cloudprint/learn/&quot; target=&quot;_blank&quot;&gt;Google Cloud Print&lt;/a&gt; still being in &lt;a href=&quot;http://en.wikipedia.org/wiki/Software_beta&quot; target=&quot;_blank&quot;&gt;beta&lt;/a&gt;.</description><link>http://scoobler.blogspot.com/2011/12/php-to-paperthe-introduction-to.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFnBkjBNAaGSGrE7MKXC6NvnGFQzQhI53Y_UujrwqK_RSM1d9E5KB_QwZKIZfHFprOF6WUtnl0BFCRtD-eRdU-sz2BvZDzs7KPVaP0Wqu3QOUjSkOudqK18V8gcv4aPm8oQqr3YYX5-gA/s72-c/print-anywhere.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-4187573424574324763</guid><pubDate>Wed, 09 Mar 2011 10:34:00 +0000</pubDate><atom:updated>2012-01-24T22:45:32.626+00:00</atom:updated><title>Using jQuery to perform a Bing API search - explained.....</title><description>&lt;a href=&quot;http://stackoverflow.com/questions/5209865/instant-search-with-keyup/5218134#5218134&quot; target=&quot;_BLANK&quot;&gt;After a recent discussion&lt;/a&gt;, I was asked to explain how the &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; &lt;a href=&quot;http://www.bing.com/developers/&quot; target=&quot;_BLANK&quot;&gt;Bing API search&lt;/a&gt;&amp;nbsp;found on the site &lt;a href=&quot;http://vynora.com/&quot;&gt;&lt;b&gt;vynora.com&lt;/b&gt;&lt;/a&gt;&amp;nbsp;worked , so decided, if its useful to one, it maybe useful to others, so in this post I will explain line by line what&#39;s happening.&lt;br /&gt;
&lt;br /&gt;
Below is an example of what you will get if you used to code &lt;i&gt;(except I&#39;ve added a button to clear the results)&lt;/i&gt;, all you need to do is type! &lt;i&gt;This kind of search box does have one major downside, if the user has javascript turned off, it won&#39;t work!! But for majority of users out there it will&amp;nbsp;&lt;/i&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-mKegqPFJVvpMt4tHcdJ5WZ9oZGTJ_Ra1iakigYuj2HA0M8zFoRy6OPZfWOx3DvfYh1HbqlPuIvnNVenHx5z2qubDtIcGPU1JvME7fk35ZOreNnM8RW1jF6CRk6Pz8qoKX6reCFo_sOA/s1600/smiley-biggrin.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;The Example:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border: 1px black solid; padding: 10px; text-align: center;&quot;&gt;
Search For: &lt;input class=&quot;search_input&quot; type=&quot;text&quot; /&gt;&lt;input id=&quot;clearBingSearchResults&quot; type=&quot;button&quot; value=&quot;Clear Results&quot; /&gt;&lt;br /&gt;
&lt;div id=&quot;result&quot; style=&quot;margin: 5px; padding: 10px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[
 $(document).ready(function(){
  $(&quot;#clearBingSearchResults&quot;).click(function(){
    $(&quot;.search_input&quot;).val(&#39;&#39;);
    $(&quot;#result&quot;).html(&quot;&quot;);
    $(&quot;#result&quot;).removeClass(&#39;surroundResults&#39;);
  }).button();
  //$(&quot;.search_input&quot;).focus();
  $(&quot;.search_input&quot;).keyup(function() {
   var search_input = $(this).val();
   var keyword = encodeURIComponent(search_input);
   var appID = &quot;C8B2DC73DEDF1D24B39C59F59158DCAF81887134&quot;;
   var yt_url=&#39;http://api.search.live.net/json.aspx?JsonType=callback&amp;JsonCallback=?&amp;Appid=&#39;+appID+&#39;&amp;query=&#39;+keyword+&#39;&amp;sources=web&#39;; 
   $.ajax({
    type: &quot;GET&quot;,
    url: yt_url,
    dataType:&quot;jsonp&quot;,
    success: function(response){
     $(&quot;#result&quot;).html(&#39;&#39;);
     $(&quot;#result&quot;).removeClass(&#39;surroundResults&#39;);
     if(response.SearchResponse.Web.Results.length){
      $(&quot;#result&quot;).addClass(&#39;surroundResults&#39;);
      $.each(response.SearchResponse.Web.Results, function(i,data){
       var title=data.Title;
       var dis=data.Description;
       var url=data.Url;
       var final=&quot;&lt;div class=&#39;webresult&#39;&gt;
&quot;
        +&quot;&lt;div class=&#39;title&#39;&gt;
&quot;
        +&quot;&lt;a class=&#39;inlineLink&#39; href=&#39;&quot;+url+&quot;&#39;&gt;&quot;+title+&quot;&lt;/a&gt;&lt;/div&gt;
&quot;
        +&quot;&lt;div class=&#39;desc&#39;&gt;
&quot;
        +dis+&quot;&lt;/div&gt;
&quot;
        +&quot;&lt;div class=&#39;url&#39;&gt;
&quot;
        +url+&quot;&lt;/div&gt;
&quot;
        +&quot;&lt;/div&gt;
&quot;;
       $(&quot;#result&quot;).append(final);
      });
     }
     else {
      $(&quot;#result&quot;).addClass(&#39;surroundResults&#39;);
      $(&quot;#result&quot;).html(&quot;&lt;div id=&#39;no&#39;&gt;
No results&lt;/div&gt;
&quot;);
     }
    }
   });
  });
 }); 
//]]&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
.title{
 color:#069;
 font-size:15px;
 padding-bottom:5px
}

.title a{
 color:#2200c1;
 text-decoration:none
}

.title a:hover{
 text-decoration:underline
}

.surroundResults{
 border: 1px black solid;
 background-color: white;
}

.desc{
 color:#333;
 padding-bottom:5px
}

.url{
 color:#0e774a
}

.webresult{
 margin-top:10px;
 padding-bottom:10px;
 padding-left:5px;
 border-bottom:1px dashed #dedede
} 

#result {
 text-align: left;
 font-family: arial,helvetica,sans serif;
}
&lt;/style&gt;&lt;br /&gt;
&lt;b&gt;The basics of the search are:&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;An input box for your user to type what they are searching for.&lt;/li&gt;
&lt;li&gt;A container to show off the results that get returned.&lt;/li&gt;
&lt;li&gt;Some &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; to perform the magic for you.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;NOTE: You will need to get an &lt;a href=&quot;http://www.bing.com/developers/createapp.aspx&quot; target=&quot;_BLANK&quot;&gt;API ID from Bing&lt;/a&gt; to allow you to perform searches on your own site. You can get one &lt;a href=&quot;http://www.bing.com/developers/createapp.aspx&quot; target=&quot;_BLANK&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Lets see some code then:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
The input box - straight forward enough:&lt;/div&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;input type=&quot;text&quot; class=&quot;search_input&quot; /&amp;gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;b&gt;NOTE:&lt;/b&gt; in &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; if you want to reference a &lt;a class=&quot;inlineLink&quot; href=&quot;http://en.wikipedia.org/wiki/Document_Object_Model&quot;&gt;DOM element&lt;/a&gt;, if it has an &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.w3schools.com/HTML/html_attributes.asp&quot;&gt;ID attribute&lt;/a&gt; use &lt;b&gt;#idName&lt;/b&gt;, if you want to reference an element by its class name use &lt;b&gt;.className&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
The results box - again straight forward enough:&lt;/div&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;div id=&quot;result&quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Finally the &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; magic:&lt;/div&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;1. $(document).ready(function(){
2.  $(&quot;.search_input&quot;).focus();
3.  $(&quot;.search_input&quot;).keyup(function() {
4.   var search_input = $(this).val();
5.   var keyword = encodeURIComponent(search_input);
6.   var appID = &quot;YOUR-OWN-APP-ID-FROM-BING&quot;;
7.   var yt_url=&#39;http://api.search.live.net/json.aspx?JsonType=callback&amp;amp;JsonCallback=?&amp;amp;Appid=&#39;+appID+&#39;&amp;amp;query=&#39;+keyword+&#39;&amp;amp;sources=web&#39;; 
8.   $.ajax({
9.    type: &quot;GET&quot;,
10.    url: yt_url,
11.    dataType:&quot;jsonp&quot;,
12.    success: function(response){
13.     $(&quot;#result&quot;).html(&#39;&#39;);
14.     if(response.SearchResponse.Web.Results.length){
15.      $.each(response.SearchResponse.Web.Results, function(i,data){
16.       var title=data.Title;
17.       var dis=data.Description;
18.       var url=data.Url;
19.       var final=&quot;&amp;lt;div class=&quot;webresult&quot;&amp;gt;&amp;lt;div class=&quot;title&quot;&amp;gt;&amp;lt;a href=&quot;http://www.blogger.com/%22+url+%22&quot;&amp;gt;&quot;+title+&quot;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;desc&quot;&amp;gt;&quot;+dis+&quot;&amp;lt;/div&amp;gt;&amp;lt;div class=&quot;url&quot;&amp;gt;&quot;+url+&quot;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&quot;;
20.       $(&quot;#result&quot;).append(final);
21.      });
22.     }
23.     else {
24.      $(&quot;#result&quot;).html(&quot;&amp;lt;div id=&quot;no&quot;&amp;gt;No results&amp;lt;/div&amp;gt;&quot;);
25.     }
26.    }
27.   });
28.  });
29. }); 
&lt;/pre&gt;
&lt;br /&gt;
OK let&#39;s break it down now......&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;When the page has finished loading, run the following code.&lt;/li&gt;
&lt;li&gt;Focus the user on the input box so they can start typing straight away.&lt;/li&gt;
&lt;li&gt;Bind a function onto the input box, listening for a keypress.&lt;/li&gt;
&lt;li&gt;Store whats been written in the input box as a variable.&lt;/li&gt;
&lt;li&gt;Encode what was in the input box so it can be passed in a URL to &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.bing.com/&quot;&gt;Bing&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Store your &lt;a href=&quot;http://www.bing.com/developers/createapp.aspx&quot; target=&quot;_BLANK&quot;&gt;Bing application ID&lt;/a&gt; you got earlier on into a variable.&lt;/li&gt;
&lt;li&gt;Store the URL to&amp;nbsp;query&amp;nbsp;as a variable. To break this down a little, we are passing our &lt;a href=&quot;http://www.bing.com/developers/createapp.aspx&quot; target=&quot;_BLANK&quot;&gt;application ID&lt;/a&gt;, the value from the input box and also informing &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.bing.com/&quot;&gt;Bing&lt;/a&gt; we want results from the web.&lt;/li&gt;
&lt;li&gt;Start a &lt;a class=&quot;inlineLink&quot; href=&quot;http://api.jquery.com/jQuery.ajax/&quot;&gt;jQuery Ajax&lt;/a&gt; request.&lt;/li&gt;
&lt;li&gt;Set the ajax type to a GET request.&lt;/li&gt;
&lt;li&gt;Set the URL for the ajax call to contact.&lt;/li&gt;
&lt;li&gt;Set the data type as &lt;a class=&quot;inlineLink&quot; href=&quot;http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/&quot;&gt;jsonp&lt;/a&gt;&lt;i&gt; (a cross browser request for JSON formated results)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;If the ajax request was&amp;nbsp;successful, perform the following &lt;i&gt;(data that was returned will be&amp;nbsp;available&amp;nbsp;as &lt;b&gt;response&lt;/b&gt;)&lt;/i&gt;.&lt;/li&gt;
&lt;li&gt;Clear any previous results.&lt;/li&gt;
&lt;li&gt;Check we actually got some results &lt;i&gt;(If there were none, the length would be 0 - 0 is equal to false. When queried like this, anything other than 0 is true)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Now use the &lt;a class=&quot;inlineLink&quot; href=&quot;http://api.jquery.com/each&quot;&gt;jQuery .each()&lt;/a&gt; function to loop through each result which was returned, performing the following for each result.&lt;/li&gt;
&lt;li&gt;Store this results title as a variable.&lt;/li&gt;
&lt;li&gt;Store this results description as a variable.&lt;/li&gt;
&lt;li&gt;Store this results URL as a&amp;nbsp;variable.&lt;/li&gt;
&lt;li&gt;Store a &lt;a class=&quot;inlineLink&quot; href=&quot;http://en.wikipedia.org/wiki/HTML&quot;&gt;HTML&lt;/a&gt;&amp;nbsp;snippet&amp;nbsp;to display this result, putting each part into a container &lt;i&gt;(this allows our CSS to make the results look pretty).&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;a class=&quot;inlineLink&quot; href=&quot;http://api.jquery.com/append&quot;&gt;jQuery&#39;s .append()&lt;/a&gt; method to add the &lt;a class=&quot;inlineLink&quot; href=&quot;http://en.wikipedia.org/wiki/HTML&quot;&gt;HTML&lt;/a&gt; snippet to the end of the results container.&lt;/li&gt;
&lt;li&gt;Finished looping through the results.&lt;/li&gt;
&lt;li&gt;Finished what happens if there were results.&lt;/li&gt;
&lt;li&gt;Perform the following in the case no results were returned.&lt;/li&gt;
&lt;li&gt;Use &lt;a class=&quot;inlineLink&quot; href=&quot;http://api.jquery.com/html&quot;&gt;jQuerys .html()&lt;/a&gt; method to set the results container to show a message saying nothing came back. This method would clear everything else from the container leaving just what it sets.&lt;/li&gt;
&lt;li&gt;Finished what happens if nothing was returned.&lt;/li&gt;
&lt;li&gt;Finished what to do when the ajax is successful.&lt;/li&gt;
&lt;li&gt;Finished the ajax call.&lt;/li&gt;
&lt;li&gt;Finished what to do when a key is pressed on the input box.&lt;/li&gt;
&lt;li&gt;Finished what to do when the page has finished loading.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
The final, but optional part for this, by now, rather long post is the &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.w3schools.com/css/&quot;&gt;CSS&lt;/a&gt; to style the results. I won&#39;t break this lot down, there is plenty of guides out there which will help you understand &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.w3schools.com/css/&quot;&gt;CSS&lt;/a&gt; if you need to know:&lt;br /&gt;
&lt;pre class=&quot;brush: css;&quot;&gt;.title{
 color:#069;
 font-size:15px;
 padding-bottom:5px
}

.title a{
 color:#2200c1;
 text-decoration:none
}

.title a:hover{
 text-decoration:underline
}

.desc{
 color:#333;
 padding-bottom:5px
}

.url{
 color:#0e774a
}

.webresult{
 margin-top:10px;
 padding-bottom:10px;
 padding-left:5px;
 border-bottom:1px dashed #dedede
} 

#result {
 text-align: left;
 font-family: arial,helvetica,sans serif;
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;One final note:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
The above code is what I was asked to explain, it isn&#39;t in my opinion a fully polished example I would put into production. When I have a moment, I will polish up the &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; code a little so it gives somewhat of a nicer user experience - i.e. advising the user when the ajax fails, and performing just one request instead of one for every letter pressed &lt;i&gt;(see the post for why this can be a problem).&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Scoobler.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Some&amp;nbsp;&lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;&amp;nbsp;books from&amp;nbsp;&lt;a class=&quot;inlineLink&quot; href=&quot;http://amazon.com/&quot;&gt;Amazon.com&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.amazon.com/HTML5-Up-Running-Mark-Pilgrim/dp/0596806027?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;HTML5: Up and Running&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0596806027&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0596806027&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/HTML5-CSS3-Tomorrows-Standards-Programmers/dp/1934356689?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;HTML5 and CSS3: Develop with Tomorrow&#39;s Standards Today (Pragmatic Programmers)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1934356689&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/jQuery-Cookbook-Solutions-Examples-Developers/dp/0596159773?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery Cookbook: Solutions &amp;amp; Examples for jQuery Developers (Animal Guide)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0596159773&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0596159773&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1934356689&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;</description><link>http://scoobler.blogspot.com/2011/03/using-jquery-to-perform-bing-api-search.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-mKegqPFJVvpMt4tHcdJ5WZ9oZGTJ_Ra1iakigYuj2HA0M8zFoRy6OPZfWOx3DvfYh1HbqlPuIvnNVenHx5z2qubDtIcGPU1JvME7fk35ZOreNnM8RW1jF6CRk6Pz8qoKX6reCFo_sOA/s72-c/smiley-biggrin.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-6296904481815219665</guid><pubDate>Mon, 07 Mar 2011 15:38:00 +0000</pubDate><atom:updated>2011-03-07T16:09:25.222+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Fancybox</category><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><category domain="http://www.blogger.com/atom/ns#">plugins</category><title>Adding Fancybox to blogger.com</title><description>&lt;a class=&quot;inlineLink&quot; href=&quot;http://fancybox.net/&quot;&gt;Fancybox&lt;/a&gt; for &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; is another one of the &lt;a class=&quot;inlineLink&quot; href=&quot;http://plugins.jquery.com/&quot;&gt;plugins&lt;/a&gt; which I really like right now. I came across &lt;a class=&quot;inlineLink&quot; href=&quot;http://fancybox.net/&quot;&gt;Fancybox&lt;/a&gt; one day in work whilst I was developing a &lt;a class=&quot;inlineLink&quot; href=&quot;http://webtrends.about.com/od/webapplications/a/web_application.htm&quot;&gt;web application&lt;/a&gt; where I wanted to show a map, but didn&#39;t really want to go down the route of using &lt;a class=&quot;inlineLink&quot; href=&quot;http://code.google.com/apis/maps/index.html&quot;&gt;Google Maps API&lt;/a&gt; to showing my own map - that all seemed far too cumbersome when I could simply open &lt;a class=&quot;inlineLink&quot; href=&quot;http://maps.google.com/&quot;&gt;Google Maps&lt;/a&gt;, but thats no fun now is it!!!&lt;br /&gt;
&lt;br /&gt;
So along came &lt;a class=&quot;inlineLink&quot; href=&quot;http://fancybox.net/&quot;&gt;Fancybox&lt;/a&gt; to save the day and make that really boring link to &lt;a class=&quot;inlineLink&quot; href=&quot;http://maps.google.com/&quot;&gt;Google Maps&lt;/a&gt; so much more pleasurable.&lt;br /&gt;
&lt;br /&gt;
OK so &lt;a class=&quot;inlineLink&quot; href=&quot;http://fancybox.net/&quot;&gt;Fancybox&lt;/a&gt; can do so much more but for the purpose of this post I will show you how to set it up to open up a pretty &lt;a class=&quot;inlineLink&quot; href=&quot;http://en.wikipedia.org/wiki/HTML_element#Frames&quot;&gt;iFrame&lt;/a&gt; popup when you click on a link you have added to your blog. &lt;br /&gt;
&lt;br /&gt;
As ever with my &lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; posts, you can try this out on this very page - &lt;i&gt;if you haven&#39;t clicked a link above already&lt;/i&gt;, go ahead and click this one below:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;inlineLink&quot; href=&quot;http://www.google.com/&quot;&gt;View: Google.com&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Pretty aint it?!?!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;A little&amp;nbsp;preparation&amp;nbsp;is key:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
First things first, Fancybox doesn&#39;t appear to have a CDN, so we are going to need to download the source files, extract them and store them somewhere online where you can reference them from.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://fancybox.net/home&quot;&gt;Download from Fancybox.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Extract the files, you will need &lt;i&gt;(at the time of&amp;nbsp;writing&amp;nbsp;this)&lt;/i&gt;:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;jquery.fancybox-1.3.4.css&lt;/li&gt;
&lt;li&gt;jquery.fancybox-1.3.4.pack.js&lt;/li&gt;
&lt;li&gt;All &lt;u&gt;images&lt;/u&gt; from the &lt;b&gt;fancybox&lt;/b&gt; folder.&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Now you need to store the files &lt;i&gt;(all in the same directory)&lt;/i&gt;&amp;nbsp;somewhere &lt;b&gt;&lt;u&gt;online&lt;/u&gt;&lt;/b&gt; where you can reference them.&lt;/li&gt;
&lt;li&gt;You will need to know the web address in a&amp;nbsp;moment &lt;i&gt;(lookout for&amp;nbsp;YOURDOMAIN.com)&lt;/i&gt;....&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;u style=&quot;font-weight: bold;&quot;&gt;Let&#39;s take a look at the code:&lt;/u&gt;&lt;br /&gt;
Firstly we need to add the plugin:&lt;br /&gt;
&lt;ol&gt;&lt;a class=&quot;inlineLink&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; /&gt;&lt;/a&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Login to your blog. At the top right of the page&amp;nbsp;&lt;i&gt;(for me anyway)&lt;/i&gt;&amp;nbsp;click&amp;nbsp;&lt;b&gt;Design&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Click on the&amp;nbsp;&lt;b&gt;Edit HTML&lt;/b&gt;&amp;nbsp;tab.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Find the line &lt;b&gt;&amp;lt;/head&amp;gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Just before the line, you need to add the following code:&lt;/li&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;script src=&#39;http://YOURDOMAIN.com/hosted/fancybox/jquery.fancybox-1.3.4.js&#39; type=&#39;text/javascript&#39;/&amp;gt; 
&amp;lt;link href=&#39;http://YOURDOMAIN.com/hosted/fancybox/jquery.fancybox-1.3.4.css&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;
&lt;/pre&gt;&lt;li style=&quot;text-align: left;&quot;&gt;Now we need to add some&amp;nbsp;&lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;&amp;nbsp;code to the section we setup in:&amp;nbsp;&lt;a class=&quot;inlineLink&quot; href=&quot;http://scoobler.blogspot.com/2011/03/jquery-hints-tips.html&quot;&gt;Adding jQuery to your blogger.com&lt;/a&gt;. Add the following lines:&lt;/li&gt;
&lt;pre class=&quot;brush: js&quot;&gt;$(&quot;a.inlineLink&quot;).fancybox({
     &#39;width&#39;             : &#39;75%&#39;,
     &#39;height&#39;            : &#39;75%&#39;,
     &#39;autoScale&#39;         : true,
     &#39;enableEscapeButton&#39;: true,
     &#39;speedIn&#39;  : 500,
     &#39;speedOut&#39;  : 500,
     &#39;padding&#39;  : 15,
     &#39;overlayColor&#39; : &#39;#123&#39;,
     &#39;transitionIn&#39;      : &#39;fade&#39;,
     &#39;transitionOut&#39;     : &#39;fade&#39;,
     &#39;type&#39;              : &#39;iframe&#39;
 });
&lt;/pre&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: left;&quot;&gt;That&#39;s the control&#39;s in place, now all you need to do is a little tweak in your post, and voila......&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ol&gt;&lt;li&gt;Create your post as you normally would, &lt;i&gt;including&lt;/i&gt; using the &lt;b&gt;Link&lt;/b&gt; feature to add links within your post.&lt;/li&gt;
&lt;li&gt;Once completed, you will need to edit your &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.w3schools.com/html/default.asp&quot;&gt;HTML&lt;/a&gt;, so click on the &lt;b&gt;Edit HTML&lt;/b&gt; tab.&lt;/li&gt;
&lt;li&gt;Now find the code for the link, taking the example above link to &lt;a class=&quot;inlineLink&quot; href=&quot;http://www.google.com/&quot;&gt;Google.com&lt;/a&gt;&amp;nbsp;it will look something like this:&lt;/li&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;a href=&quot;http://www.google.com/&quot;&amp;gt;View: Google.com&amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;li&gt;Now we need to add the trigger, so when the user clicks the link it open &lt;a class=&quot;inlineLink&quot; href=&quot;http://fancybox.net/&quot;&gt;Fancybox&lt;/a&gt;:&lt;/li&gt;
&lt;pre class=&quot;brush: html&quot;&gt;class=&quot;inlineLink&quot;&lt;/pre&gt;&lt;li&gt;The final code will look something like this:&lt;/li&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;a href=&quot;http://www.google.com/&quot; class=&quot;inlineLink&quot;&amp;gt;View: Googlee.com&amp;lt;/a&amp;gt;
&lt;/pre&gt;&lt;/ol&gt;&lt;div&gt;Simple, but so effective! Great for when you want to show a reader something without them&amp;nbsp;disappearing&amp;nbsp;off from your blog!&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;u style=&quot;font-weight: bold;&quot;&gt;NOTE:&lt;/u&gt;&amp;nbsp;Make sure you check your links once you have added the effect, there are the odd sites out there which won&#39;t work in an &lt;a class=&quot;inlineLink&quot; href=&quot;http://en.wikipedia.org/wiki/HTML_element#Frames&quot;&gt;iFrame&lt;/a&gt;, take &lt;a class=&quot;inlineLink&quot; href=&quot;http://youtube.com/&quot;&gt;YouTube.com&lt;/a&gt; for example &lt;i&gt;(go on give it a click)&lt;/i&gt;.....&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Scoobler.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Some&amp;nbsp;&lt;a class=&quot;inlineLink&quot; href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;&amp;nbsp;books from&amp;nbsp;&lt;a class=&quot;inlineLink&quot; href=&quot;http://amazon.com/&quot;&gt;Amazon.com&lt;/a&gt;:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.amazon.com/Professional-Ajax-2nd-Programmer/dp/0470109491?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Professional Ajax, 2nd Edition (Programmer to Programmer)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0470109491&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0470109491&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Smashing-jQuery-Magazine-Book/dp/047097723X?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Smashing jQuery (Smashing Magazine Book Series)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=047097723X&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;JavaScript: The Good Parts&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0596517742&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0596517742&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=047097723X&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://scoobler.blogspot.com/2011/03/adding-fancybox-to-bloggercom.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s72-c/Adding-jQuery-Design.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-5072543724168099896</guid><pubDate>Sun, 06 Mar 2011 16:09:00 +0000</pubDate><atom:updated>2011-03-06T17:14:28.497+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blogger.com</category><category domain="http://www.blogger.com/atom/ns#">CDN</category><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>Adding a jQuery UI Dialog to your blogger.com</title><description>One item I find very useful from the &lt;a class=&quot;inlineLink&quot; href=&quot;http://jqueryui.com/&quot;&gt;jQuery UI&lt;/a&gt; range is the &lt;a class=&quot;inlineLink&quot; href=&quot;http://jqueryui.com/demos/dialog/&quot;&gt;.dialog()&lt;/a&gt;, its a much nicer sight than the typical browser &lt;a href=&quot;http://www.w3schools.com/JS/js_popup.asp&quot; class=&quot;inlineLink&quot; &gt;alert()&lt;/a&gt; box! &lt;br /&gt;
&lt;br /&gt;
In this little tutorial I will show you how to add a &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Wrapper_function&quot;&gt;wrapper function&lt;/a&gt; which will allow you to show a dialog with a custom title and contents from anywhere in your blog. I have opted for a &lt;a href=&quot;http://en.wikipedia.org/wiki/Wrapper_function&quot;&gt;wrapper function&lt;/a&gt; as I generally don&#39;t change my dialog&#39;s, you could, if you wanted change things to allow you to&amp;nbsp;customize the dialog a little more. But for now, I&#39;ll stick with the simple stuff!&lt;br /&gt;
&lt;br /&gt;
If you have looked at my post on &lt;b&gt;&lt;i&gt;&quot;&lt;a href=&quot;http://scoobler.blogspot.com/2011/03/jquery-hints-tips.html&quot;&gt;Adding jQuery to your blogger.com&lt;/a&gt;&quot;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;and you were keen, you may have noticed, in the demo towards the bottom of the page, where I used the &lt;a href=&quot;http://jqueryui.com/demos/button/&quot;&gt;jQuery UI .button()&lt;/a&gt; effect to change a boring button for a nice pretty one, I also changed what happens when you click the button &lt;i&gt;(just in case you wanted to see &lt;b&gt;it really does work&lt;/b&gt;) &lt;/i&gt;yep, its a dialog.&lt;br /&gt;
&lt;br /&gt;
Just in case you want to see it again: &lt;input class=&quot;myButtons&quot; id=&quot;exampleButton&quot; type=&quot;button&quot; value=&quot;Click Me&quot; /&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
$(&quot;#exampleButton&quot;).click(function(){
$(&quot;#dialogMsg&quot;).dialogPopup(&quot;Ha, you really did it..&quot;, &#39;You clicked a jQuery UI button and got a jQuery UI dialog!! Imagine that &lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-mKegqPFJVvpMt4tHcdJ5WZ9oZGTJ_Ra1iakigYuj2HA0M8zFoRy6OPZfWOx3DvfYh1HbqlPuIvnNVenHx5z2qubDtIcGPU1JvME7fk35ZOreNnM8RW1jF6CRk6Pz8qoKX6reCFo_sOA/s1600/smiley-biggrin.png&quot; /&gt; &#39;); 
});
});
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Lets see some code:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Firstly lets add the &lt;a href=&quot;http://www.w3schools.com/html/&quot;&gt;HTML&lt;/a&gt; needed for the dialog:&lt;br /&gt;
&lt;ol&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; /&gt;&lt;/a&gt;
&lt;li&gt;Login to your blog. At the top right of the page&amp;nbsp;&lt;i&gt;(for me anyway)&lt;/i&gt;&amp;nbsp;click&amp;nbsp;&lt;b&gt;Design&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Click on the&amp;nbsp;&lt;b&gt;Edit HTML&lt;/b&gt;&amp;nbsp;tab.&lt;/li&gt;
&lt;li&gt;Now search for the line&amp;nbsp;&lt;b&gt;&amp;lt;/body&amp;gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Just before the line, add the following code, this will be the holder for the &lt;a href=&quot;http://jqueryui.com/demos/dialog/&quot;&gt;dialog&lt;/a&gt;:&lt;/li&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;div id=&#39;dialogMsg&#39; style=&#39;display:none;&#39;/&amp;gt;&lt;/pre&gt;&lt;/ol&gt;&lt;div&gt;Now its time for the &lt;a href=&quot;http://en.wikipedia.org/wiki/Wrapper_function&quot;&gt;jQuery wrapper function&lt;/a&gt; which will do the work of displaying the default dialog:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Whilst still in the &lt;b&gt;Edit HTML &lt;/b&gt;section, we are going to add some code to our &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; block we setup if you followed&amp;nbsp;&lt;b&gt;&lt;i&gt;&quot;&lt;a href=&quot;http://scoobler.blogspot.com/2011/03/jquery-hints-tips.html&quot;&gt;Adding jQuery to your blogger.com&lt;/a&gt;&quot;.&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Find the line&amp;nbsp;&lt;b&gt;$(document).ready(function(){&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Just after the line, add the following code:&lt;/li&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;$.fn.dialogPopup=function(title, content) {
  $(this).html(&#39;&#39;);
  $(this).dialog(&#39;destroy&#39;);
  $(this).html(content);
  $(this).dialog({
   title:title, 
   modal:true,
   autoOpen:true,
   buttons: {
    &quot;Close&quot;: function() {
     $(this).dialog(&quot;close&quot;);
    }
   },
   destroyOnEscape:true
  });
 };
&lt;/pre&gt;&lt;/ol&gt;&lt;div&gt;OK so now all the codes in place lets see how we could use our new &lt;a href=&quot;http://en.wikipedia.org/wiki/Wrapper_function&quot;&gt;wrapper function&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;A basic button example:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Start by creating a &lt;b&gt;New Post&lt;/b&gt;, or &lt;b&gt;Editing&lt;/b&gt; an existing one.&lt;/li&gt;
&lt;li&gt;Complete your page first using the &lt;b&gt;Compose&lt;/b&gt; tab &lt;i&gt;(if thats how you normally do things)&lt;/i&gt;.&lt;/li&gt;
&lt;li&gt;Click on the &lt;b&gt;Edit HTML &lt;/b&gt;tab. Now we&#39;ll add the &lt;a href=&quot;http://www.w3schools.com/html/&quot;&gt;HTML&lt;/a&gt; and &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery code&lt;/a&gt; which does the&amp;nbsp;niceties.&lt;/li&gt;
&lt;li&gt;Find the part of the code where you want to add the, in this case &lt;a href=&quot;http://jqueryui.com/demos/button/&quot;&gt;button&lt;/a&gt; and add the following &lt;a href=&quot;http://www.w3schools.com/html/&quot;&gt;HTML&lt;/a&gt;:&lt;/li&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;input id=&quot;myNewButton&quot; type=&quot;button&quot; value=&quot;Nice jQuery UI Button&quot; /&amp;gt;&lt;/pre&gt;&lt;li&gt;Finally add a little &lt;a href=&quot;http://www.w3schools.com/tags/tag_script.asp&quot;&gt;script block&lt;/a&gt; which will allow us to setup the &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery code&lt;/a&gt; &lt;b&gt;&lt;i&gt;just for this post&lt;/i&gt;&lt;/b&gt;:&lt;/li&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
 $(function(){
  $(&quot;#myNewButton&quot;).click(function(){
   $(&quot;#dialogMsg&quot;).dialogPopup(&quot;This is the title...&quot;, &quot;And this is the contents of the dialog!&quot;); 
  }).button();
 });
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;&lt;u&gt;The results from above&lt;/u&gt;&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;input id=&quot;myNewButton&quot; type=&quot;button&quot; value=&quot;Nice jQuery UI Button&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
What else could we use this for? What every you can think of!!! How about stopping someone right licking on the page &lt;i&gt;(go on, you should know by now that you can try it out). &lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Wanna see how I did it:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;$(this).mousedown(function(event) {
   switch (event.which) {
    case 3:
     $(document).bind(&quot;contextmenu&quot;,function(){return false;});
     $(&quot;#dialogMsg&quot;).dialogPopup(&quot;No right clicking....&quot;, &quot;I do hope that was a test and ya ain&#39;t trying to pinch my code ya cheeky bugger :p &quot;);
     break;
    }
  });
&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Scoobler&lt;/i&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Some&amp;nbsp;&lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;&amp;nbsp;books on&amp;nbsp;&lt;a href=&quot;http://amazon.com/&quot;&gt;Amazon.com&lt;/a&gt;:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.amazon.com/JavaScript-Definitive-Guide-David-Flanagan/dp/0596101996?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;JavaScript: The Definitive Guide&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0596101996&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0596101996&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Murachs-JavaScript-DOM-Scripting-Murach/dp/1890774553?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Murach&#39;s JavaScript and DOM Scripting (Murach: Training &amp;amp; Reference)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1890774553&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1890774553&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/jQuery-UI-1-6-Interface-Library/dp/1847195121?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery UI 1.6: The User Interface Library for jQuery&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1847195121&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1847195121&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
 $(function(){
  $(&quot;#myNewButton&quot;).click(function(){
   $(&quot;#dialogMsg&quot;).dialogPopup(&quot;This is the title...&quot;, &quot;And this is the contents of the dialog!&quot;); 
  }).button();
  $(this).mousedown(function(event) {
   switch (event.which) {
    case 3:
     $(document).bind(&quot;contextmenu&quot;,function(){return false;});
     $(&quot;#dialogMsg&quot;).dialogPopup(&quot;No right clicking....&quot;, &#39;I do hope that was a test and ya aint trying to pinch my code ya cheeky bugger &lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7d4Qm2_qjsfiAjwXtNq-CcW2ehd9gDUNHs2KIlQ1_lOXtRGo8rWaPYRDc4rCvjwCzF3vgWC-Q3bVbQCIVKEudIR6SY7mwphcFUFoP54MqIWde7ebqJX7xJvsjV94YFPb120Dkoma2c44/s1600/smiley-tongue.png&quot; /&gt;&lt;br/&gt;&lt;a href=&quot;http://scoobler.blogspot.com/2011/03/adding-jquery-ui-dialog-to-your.html&quot;&gt;Read why you are seeing this...&lt;/a&gt;&#39;);
     break;
    }
  });
 });
&lt;/script&gt;&lt;/div&gt;</description><link>http://scoobler.blogspot.com/2011/03/adding-jquery-ui-dialog-to-your.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-mKegqPFJVvpMt4tHcdJ5WZ9oZGTJ_Ra1iakigYuj2HA0M8zFoRy6OPZfWOx3DvfYh1HbqlPuIvnNVenHx5z2qubDtIcGPU1JvME7fk35ZOreNnM8RW1jF6CRk6Pz8qoKX6reCFo_sOA/s72-c/smiley-biggrin.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-6839701406991168899</guid><pubDate>Sun, 06 Mar 2011 12:30:00 +0000</pubDate><atom:updated>2011-03-07T15:20:25.984+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blogger.com</category><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><category domain="http://www.blogger.com/atom/ns#">scrollTop</category><title>Adding a scollTop link to blogger.com</title><description>After &lt;b&gt;&lt;i&gt;&quot;&lt;a href=&quot;http://scoobler.blogspot.com/2011/03/jquery-hints-tips.html&quot;&gt;Adding jQuery to your blogger.com&lt;/a&gt;&quot;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;I decided it was time to add my first little hack to every blog post I make.&amp;nbsp;So the first item on the&amp;nbsp;agenda is a link to scroll to the top of the page &lt;i&gt;(see it in action at the bottom right of this page...)&lt;/i&gt;&amp;nbsp;this isn&#39;t something new, but I&amp;nbsp;decided&amp;nbsp;I would do things my way, so I&#39;ll share how I have achieved this.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVa2pErN9xsERmT3ax90FaczcgY2fXM7IdqymRMdEx_xrF8QF-c82fm4_WUM0keOVaARZyJhVEJtL8ijV0XGwzPUek5v24MpUJ7m2s4fdMRqRxawfxc86DYcni6taCcoNb-XRxprKzPAo/s1600/jQuery-scrollTop-link.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVa2pErN9xsERmT3ax90FaczcgY2fXM7IdqymRMdEx_xrF8QF-c82fm4_WUM0keOVaARZyJhVEJtL8ijV0XGwzPUek5v24MpUJ7m2s4fdMRqRxawfxc86DYcni6taCcoNb-XRxprKzPAo/s1600/jQuery-scrollTop-link.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The beauty of this link &lt;i&gt;and it is a link, not an image ;) &lt;/i&gt;is, it will only appear once the visitor has scrolled down from the top of the page and disappear again once they are back at the top. And it uses &lt;a href=&quot;http://api.jquery.com/animate/&quot;&gt;jQuery&#39;s .animate()&lt;/a&gt; function to make the users experience that little bit more pleasant.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Lets get started:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;OK so to start with, we will need to add a link to the page. It isn&#39;t really too important where on the page its added as we will be using &lt;a href=&quot;http://www.w3schools.com/css/&quot;&gt;CSS&lt;/a&gt; to move its location and make it look pretty, but inside the &lt;b&gt;&amp;lt;body&amp;gt;..&amp;lt;/body&amp;gt; &lt;/b&gt;tags will be best.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; /&gt;&lt;/a&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Login to your blog. At the top right of the page &lt;i&gt;(for me anyway)&lt;/i&gt; click &lt;b&gt;Design&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Click on the &lt;b&gt;Edit HTML&lt;/b&gt; tab.&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Now search for the line: &lt;b&gt;&amp;lt;/body&amp;gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Now just above the tag you want to add the line &lt;i&gt;(set the text to what ever you want to appear)&lt;/i&gt;:&lt;/li&gt;
&lt;pre class=&quot;brush: html;&quot;&gt;&amp;lt;a href=&#39;#&#39; id=&#39;toTop&#39;&amp;gt;Scroll to Top&amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Next we want to add the &lt;a href=&quot;http://www.w3schools.com/css/&quot;&gt;CSS&lt;/a&gt;&amp;nbsp;to the page to make our link look a little more appealing. We can use the Template Designer&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;, verdana, arial, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;to add the &lt;a href=&quot;http://www.w3schools.com/css/&quot;&gt;CSS&lt;/a&gt;, this will ensure the code is in the correct place.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Now click on the &lt;b&gt;Template Designer&lt;/b&gt; tab.&lt;/li&gt;
&lt;li&gt;On the list &lt;i&gt;(top left) &lt;/i&gt;click on &lt;b&gt;Advanced.&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Now scroll down and click on &lt;b&gt;Add CSS&lt;/b&gt;.&lt;/li&gt;
&lt;li&gt;In the input box, add the following &lt;i&gt;(change the colors and things to suite)&lt;/i&gt; and click &lt;b&gt;Apply to Blog&lt;/b&gt;: &lt;/li&gt;
&lt;pre class=&quot;brush: css;&quot;&gt;/* to top */
#toTop {
&amp;nbsp;&amp;nbsp;width: 100px;
&amp;nbsp;&amp;nbsp;background: #99d9f2;
&amp;nbsp;&amp;nbsp;border: 1px solid #bce1a6;
&amp;nbsp;&amp;nbsp;text-align: center;
&amp;nbsp;&amp;nbsp;padding: 5px;
&amp;nbsp;&amp;nbsp;position: fixed;
&amp;nbsp;&amp;nbsp;bottom: 10px;
&amp;nbsp;&amp;nbsp;right: 10px;
&amp;nbsp;&amp;nbsp;cursor: pointer;
&amp;nbsp;&amp;nbsp;color: #333333;
&amp;nbsp;&amp;nbsp;text-decoration: none;
}&lt;/pre&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;
Now we will have a link appear on the page at the bottom right, it will technically return the visitor to the top of the page, &lt;b&gt;&lt;u&gt;but&lt;/u&gt;&lt;/b&gt; not in a nice way, so onto the &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; that will do the niceties for us:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Return to the &lt;b&gt;Edit HTML&lt;/b&gt; tab, in the &lt;b&gt;Design&lt;/b&gt; section.&lt;/li&gt;
&lt;li&gt;Now we need to add some &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; code to the section we setup in: &lt;a href=&quot;http://scoobler.blogspot.com/2011/03/jquery-hints-tips.html&quot;&gt;Adding jQuery to your blogger.com&lt;/a&gt;. Add the following lines:&lt;/li&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;$(&quot;#toTop&quot;).hide().removeAttr(&quot;href&quot;);
 if($(document).scrollTop()!=&quot;0&quot;) {
  $(&quot;#toTop&quot;).fadeIn(&quot;slow&quot;);
 }
 $(window).scroll(function(){
  if($(window).scrollTop()==&quot;0&quot;){
   $(&quot;#toTop&quot;).hide(&quot;slow&quot;);
  }
  else{
   $(&quot;#toTop&quot;).show(&quot;slow&quot;); 
  }
 });

 $(&quot;#toTop&quot;).click(function(){
  $(&quot;html, body&quot;).animate({ scrollTop: &quot;0px&quot; });
 });
&lt;/pre&gt;&lt;li&gt;The result will be something like this:&lt;/li&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;&amp;lt;script type=&#39;text/javascript&#39;&amp;gt;
//&amp;lt;![CDATA[
$(document).ready(function() {
 $(&quot;#toTop&quot;).hide().removeAttr(&quot;href&quot;);
 if($(document).scrollTop()!=&quot;0&quot;) {
  $(&quot;#toTop&quot;).fadeIn(&quot;slow&quot;);
 }
 $(window).scroll(function(){
  if($(window).scrollTop()==&quot;0&quot;){
   $(&quot;#toTop&quot;).hide(&quot;slow&quot;);
  }
  else{
   $(&quot;#toTop&quot;).show(&quot;slow&quot;); 
  }
 });

 $(&quot;#toTop&quot;).click(function(){
  $(&quot;html, body&quot;).animate({ scrollTop: &quot;0px&quot; });
 });
});
//]]&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;li&gt;Now save the template, and take a look at your work!!&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;If you have followed everything, you should have a link appear once you scroll away from the top of a post, and if you click the link, you will be scrolled to the top of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Scoobler.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Some &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; books from &lt;a href=&quot;http://amazon.com/&quot;&gt;Amazon.com&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.amazon.com/jQuery-1-4-Animation-Techniques-Beginners/dp/1849513309?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery 1.4 Animation Techniques: Beginners Guide&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1849513309&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1849513309&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/jQuery-Dummies-Lynn-Beighley/dp/0470584459?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery For Dummies&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0470584459&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0470584459&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/jQuery-Pocket-Reference-David-Flanagan/dp/1449397220?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery Pocket Reference&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1449397220&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1449397220&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://scoobler.blogspot.com/2011/03/adding-scolltop-link-to-bloggercom.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVa2pErN9xsERmT3ax90FaczcgY2fXM7IdqymRMdEx_xrF8QF-c82fm4_WUM0keOVaARZyJhVEJtL8ijV0XGwzPUek5v24MpUJ7m2s4fdMRqRxawfxc86DYcni6taCcoNb-XRxprKzPAo/s72-c/jQuery-scrollTop-link.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4624294245286004140.post-3904832850891296261</guid><pubDate>Sat, 05 Mar 2011 22:09:00 +0000</pubDate><atom:updated>2011-03-06T16:10:26.464+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blogger.com</category><category domain="http://www.blogger.com/atom/ns#">CDN</category><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>Adding jQuery to your blogger.com</title><description>&lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; is one of my favorite &lt;a href=&quot;http://en.wikipedia.org/wiki/Web_application_framework&quot;&gt;frameworks&lt;/a&gt; available today. The sheer versatility of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Web_application_framework&quot;&gt;framework&lt;/a&gt; is outstanding. So you can expect to see a fair few posts on &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; throughout this blog. Hopefully you will find them useful - please feel free to ask questions, I will help out if and where I can!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://jquery.com/&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLbPglK-SjiEfQ26ZtGHMRu1QSlSezYByHaQ9eBjvCLllw4YoLlzwj3HRHlz4ieYWThunk6NlSoxKqZWSzv7TEktU-y5BFujiQnTalRHl7SN6edjAuc_cTVLUdgmtE8CjVrodgqJKsZMg/s1600/jQuery.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I will dive straight in, with this being the first blog on the site, I may as well make it about my experience with setting up the blog, preparing it for the many posts to come.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Adding jQuery to &lt;a href=&quot;http://blogger.com/&quot;&gt;blogger.com&lt;/a&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMJ9cgmfJahaaqQX_IdcEocpzqYABaS5wTsva6Mg-gp9KPGHr6hyNbo68FgXTEmDCWo26q2768qV7YgJZv89sK79frNwPvOIMzYsNZpAE3503zJe8oZz_LpfTbSqfXmm9BIpXhrWVOwCg/s1600/Adding-jQuery-Design.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Login to your blog. At the top right of the page &lt;i&gt;(for me anyway)&lt;/i&gt;&amp;nbsp;click &lt;b&gt;Design&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Click on the &lt;b&gt;Edit HTML&lt;/b&gt;&amp;nbsp;tab.&lt;/li&gt;
&lt;li&gt;Now search for the line &lt;b&gt;&amp;lt;head&amp;gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Now you need to add the &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; core &lt;i&gt;(I will be using the &lt;a href=&quot;http://en.wikipedia.org/wiki/Content_delivery_network&quot;&gt;Google CDN&lt;/a&gt; version)&lt;/i&gt;, after &lt;b&gt;&amp;lt;head&amp;gt;&lt;/b&gt; add the following lines -&lt;i&gt; you will notice I am also adding the&lt;a href=&quot;http://jqueryui.com/&quot;&gt; jQuery UI&lt;/a&gt; aswell&lt;/i&gt;:&lt;/li&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;&amp;lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&quot; type=&quot;text/javascript&quot;&amp;gt;
&amp;lt;script src=&#39;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js&#39; type=&#39;text/javascript&#39;/&amp;gt;
&amp;lt;link href=&#39;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;
&lt;/pre&gt;&lt;li&gt;Next is to add any&lt;a href=&quot;http://jquery.com/&quot;&gt; jQuery&lt;/a&gt; code you want to load with &lt;u&gt;&lt;b&gt;EVERY&lt;/b&gt;&lt;/u&gt; page:&lt;/li&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;&amp;lt;script type=&#39;text/javascript&#39;&amp;gt;
//&amp;lt;![CDATA[
$(document).ready(function() {

});
//]]&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;li&gt;Now you can place anything you want to run when the blog loads in the normal way.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;b&gt;&lt;u&gt;For example:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;If you wanted to turn all buttons that you place on your blog: &lt;input id=&quot;simpleButton&quot; onclick=&quot;alert(&#39;Just a plain old normal button!&#39;)&quot; type=&quot;button&quot; value=&quot;Normal Button&quot; /&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;&amp;lt;input type=&quot;button&quot; id=&quot;myButton&quot; value=&quot;This Button&quot; /&amp;gt;&lt;/pre&gt;Into &lt;a href=&quot;http://jqueryui.com/&quot;&gt;jQuery UI&lt;/a&gt; buttons you could do this: &lt;input class=&quot;myButtons&quot; id=&quot;niceButton&quot; type=&quot;button&quot; value=&quot;Nice jQuery UI Button&quot; /&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
 $(&quot;#niceButton&quot;).click(function(){
  $(&quot;#dialogMsg&quot;).dialogPopup(&quot;Told ya...&quot;, &quot;It really is a jQuery UI button!!! And this is really a jQuery UI dialog too :)&quot;); 
 });
});
&lt;/script&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;&amp;lt;script type=&#39;text/javascript&#39;&amp;gt;
//&amp;lt;![CDATA[
$(document).ready(function() {
$(&quot;:button&quot;).button();
});
//]]&amp;gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Note:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
The reason for adding the code between:&lt;br /&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;//&amp;lt;![CDATA[
.....
//]]&amp;gt;
&lt;/pre&gt;Is that when you submit the code, it stops the code being interpreted, and characters being swapped for their &lt;a href=&quot;http://en.wikipedia.org/wiki/Ascii&quot;&gt;ASCII&lt;/a&gt; representation. This isn&#39;t really a problem for most browsers, but it makes the code much harder to read next time you fancy changing something!&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Scoobler&lt;/i&gt;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Some&amp;nbsp;&lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; books on &lt;a href=&quot;http://amazon.com/&quot;&gt;Amazon.com&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.amazon.com/jQuery-Action-Second-Bear-Bibeault/dp/1935182323?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery in Action, Second Edition&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=1935182323&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1935182323&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.amazon.com/jQuery-Cookbook-Solutions-Examples-Developers/dp/0596159773?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery Cookbook: Solutions &amp;amp; Examples for jQuery Developers (Animal Guide)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0596159773&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0596159773&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.amazon.com/jQuery-Novice-Ninja-Earle-Castledine/dp/0980576857?ie=UTF8&amp;amp;tag=scooblerlifei-20&amp;amp;link_code=bil&amp;amp;camp=213689&amp;amp;creative=392969&quot; imageanchor=&quot;1&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;jQuery: Novice to Ninja&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;ID=AsinImage&amp;amp;WS=1&amp;amp;Format=_SL160_&amp;amp;ASIN=0980576857&amp;amp;tag=scooblerlifei-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0980576857&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=scooblerlifei-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1847199720&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://scoobler.blogspot.com/2011/03/jquery-hints-tips.html</link><author>noreply@blogger.com (Scoobler)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLbPglK-SjiEfQ26ZtGHMRu1QSlSezYByHaQ9eBjvCLllw4YoLlzwj3HRHlz4ieYWThunk6NlSoxKqZWSzv7TEktU-y5BFujiQnTalRHl7SN6edjAuc_cTVLUdgmtE8CjVrodgqJKsZMg/s72-c/jQuery.png" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>