<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns: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'><id>tag:blogger.com,1999:blog-8196372891419318492</id><updated>2026-07-17T20:01:27.417-07:00</updated><category term="JQuery"/><category term="C#"/><category term="Entity Framework"/><category term="css"/><title type='text'>WEBSITE HOWTO</title><subtitle type='html'>BLOG IS ABOUT WEBSITE DEVELOPMENT. I COLLECT DIFFERENT CODE SNIPPETS, HOWTO&#39;S, TIPS AND PERFORMANCE OBSERVATIONS</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-3167935280920395705</id><published>2011-10-18T10:45:00.000-07:00</published><updated>2011-10-18T10:45:28.521-07:00</updated><title type='text'>Android development: ListView inside a PopupWindow</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20px;&quot;&gt;For some reason (you don&#39;t want to know believe me), I had to put a ListView in a PopupWindow. In more recent versions of Android (newer than Gingerbread) there is the convenient android.widget.ListPopupWindow class which does that job for you.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
But for Gingerbread, you&#39;ll have to put the list in the PopupWindow. That&#39;s what I did, it showed up fine when I show the popup, I could scroll the ListView, but sadness, the OnItemClick of the OnItemClickListener would not get fired when pressing a item in the ListView.&lt;/div&gt;
&lt;div&gt;
After spending way to much time (getting the Android Java source code associated with the Android jar in Eclipse and stepping through the code in the debugger), I discovered that I had to set the PopupWindow to be focusable:&lt;/div&gt;
&lt;div&gt;
mPopupWindow.setFocusable(true);&lt;/div&gt;
&lt;div&gt;
And then voila, the OnItemClick gets called!&lt;/div&gt;
&lt;div&gt;
Hope it helps someone!&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/3167935280920395705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/10/android-development-listview-inside.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/3167935280920395705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/3167935280920395705'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/10/android-development-listview-inside.html' title='Android development: ListView inside a PopupWindow'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-3294439177931422525</id><published>2011-09-21T07:08:00.000-07:00</published><updated>2011-09-21T07:08:11.063-07:00</updated><title type='text'>Andoid emulator skins</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you want&amp;nbsp;your emulator has additional skin, then read this article:&lt;br /&gt;
&lt;a href=&quot;http://heikobehrens.net/2011/03/15/android-skins/&quot;&gt;http://heikobehrens.net/2011/03/15/android-skins/&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/3294439177931422525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/09/andoid-emulator-skins.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/3294439177931422525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/3294439177931422525'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/09/andoid-emulator-skins.html' title='Andoid emulator skins'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-8331708304112648104</id><published>2011-08-15T02:16:00.000-07:00</published><updated>2011-08-15T02:16:15.264-07:00</updated><title type='text'>In JavaScript, curly brace placement matters: An example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If you’ve been working with JavaScript very long, you probably know that you should format curly braces in JavaScript code a certain way. In fact, if you’ve watched my TekPub series,&amp;nbsp;&lt;a href=&quot;http://tekpub.com/productions/jquery&quot; style=&quot;color: #cc6600;&quot; target=&quot;_blank&quot;&gt;Mastering jQuery&lt;/a&gt;, you’ve heard me stop James and remind him that at the beginning of nearly every episode.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;However, you’re less likely to have seen a clear example of&amp;nbsp;&lt;strong style=&quot;color: black; font-style: normal; font-weight: bold;&quot;&gt;why this matters or why you should care&lt;/strong&gt;. Even when you hear advice from a trusted source, it can be difficult to heed that advice if it seems like hearsay or convention for the sake of convention.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;While I was working on&amp;nbsp;&lt;a href=&quot;http://encosia.com/2011/03/14/use-jquery-to-extract-data-from-html-lists-and-tables/&quot; style=&quot;color: #cc6600;&quot;&gt;my recent post about extracting data objects from HTML structures&lt;/a&gt;, it occurred to me that some of its example code presented a great learning opportunity regarding this topic. So, I want to take advantage of that opportunity to show you&amp;nbsp;&lt;strong style=&quot;color: black; font-style: normal; font-weight: bold;&quot;&gt;a concrete example of how placing your braces on the wrong line can break your JavaScript code&lt;/strong&gt;.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span id=&quot;more-1094&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-size: 18px; font-weight: bold; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Allman, K&amp;amp;R, and you&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The specific part of the previous post that I want to talk about is this:&lt;/div&gt;&lt;div class=&quot;wp_syntax&quot; style=&quot;background-color: #f0f9ff; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1px; color: #110000; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;code&quot; style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; vertical-align: top;&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;clear: none; float: none; font-family: monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: auto;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;
  id&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc;&quot;&gt;&#39;id&#39;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
  text&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Notice how the opening brace in the object literal is on the same line as the&lt;code style=&quot;background-color: #eeeeee; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-family: courier, monospace; font-size: 13px; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;&quot;&gt;return&lt;/code&gt;&amp;nbsp;statement.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Placing opening braces on the same line as their corresponding control statements like that is called&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Indent_style#K.26R_style&quot; rel=&quot;nofollow&quot; style=&quot;color: #cc6600;&quot; target=&quot;_blank&quot;&gt;K&amp;amp;R style&lt;/a&gt;. Unlike most differences in coding style – most amounting to personal preference – using K&amp;amp;R style braces in JavaScript is important for an objective reason.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;That reason is well-illustrated by looking at the alternative style in this case. That alternative,&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Indent_style#Allman_style_.28bsd_in_Emacs.29&quot; rel=&quot;nofollow&quot; style=&quot;color: #cc6600;&quot; target=&quot;_blank&quot;&gt;Allman style&lt;/a&gt;, is a style that’s more common in languages like C#. Allman style braces are placed alone, at the beginning of the line immediately&amp;nbsp;&lt;em style=&quot;font-style: italic; font-weight: normal;&quot;&gt;after&lt;/em&gt;a control statement.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Modifying the previous code to use Allman style braces would look like this:&lt;/div&gt;&lt;div class=&quot;wp_syntax&quot; style=&quot;background-color: #f0f9ff; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1px; color: #110000; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;code&quot; style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; vertical-align: top;&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;clear: none; float: none; font-family: monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: auto;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;return&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;
  id&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc;&quot;&gt;&#39;id&#39;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
  text&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;color: black; font-style: normal; font-weight: bold;&quot;&gt;That code is now broken.&lt;/strong&gt;&amp;nbsp;Though you can usually get away with using Allman style braces in JavaScript, returning object literals is an example of when you cannot.&lt;/div&gt;&lt;h3 style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-size: 18px; font-weight: bold; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;JavaScript semicolon insertion can ruin your day&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The culprit here is JavaScript’s infamous semicolon insertion feature. A JavaScript interpreter will parse&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-family: courier, monospace; font-size: 13px; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;&quot;&gt;return\n&lt;/code&gt;&amp;nbsp;as a complete statement, assume that you forgot a semicolon at the end, and then treat it as&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-family: courier, monospace; font-size: 13px; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;&quot;&gt;return;\n&lt;/code&gt;&amp;nbsp;instead.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In other words, when you write this:&lt;/div&gt;&lt;div class=&quot;wp_syntax&quot; style=&quot;background-color: #f0f9ff; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1px; color: #110000; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;code&quot; style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; vertical-align: top;&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;clear: none; float: none; font-family: monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: auto;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;return&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;
  id&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc;&quot;&gt;&#39;id&#39;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
  text&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It’s actually interpreted as if you had written this:&lt;/div&gt;&lt;div class=&quot;wp_syntax&quot; style=&quot;background-color: #f0f9ff; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1px; color: #110000; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;code&quot; style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; vertical-align: top;&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;clear: none; float: none; font-family: monospace; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: auto;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;// Waiter, I didn&#39;t order this semicolon!&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt;
  id&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc;&quot;&gt;&#39;id&#39;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
  text&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; $item.&lt;span style=&quot;color: #660066;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The insidious result is that almost all browsers will allow the code to execute, but the prematurely terminated return statement will return&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-family: courier, monospace; font-size: 13px; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;&quot;&gt;undefined&lt;/code&gt;&amp;nbsp;instead of the object you’d expect. No syntax error, no warning; just a chunk of “working” code that behaves inexplicably.&lt;/div&gt;&lt;h3 style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #333333; font-size: 18px; font-weight: bold; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Conclusion&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Since this problem manifests itself as an&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-family: courier, monospace; font-size: 13px; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;&quot;&gt;undefined&lt;/code&gt;&amp;nbsp;return value, you can imagine how painful it can be to trace that back to an artifact of where the curly brace is located. Unless you’re already aware of the semicolon insertion trap, brace placement is usually the last thing that you’d suspect to be the culprit in these situations.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The problem would have been even worse in&amp;nbsp;&lt;a href=&quot;http://encosia.com/2011/03/14/use-jquery-to-extract-data-from-html-lists-and-tables/&quot; style=&quot;color: #cc6600;&quot;&gt;the larger example that this code excerpt was extracted from&lt;/a&gt;. The object literal’s location within the&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; font-family: courier, monospace; font-size: 13px; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;&quot;&gt;.map()&lt;/code&gt;&amp;nbsp;call would have obfuscated the root issue even farther since “mapping” a series of undefined return values would simply result in an empty array.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Key takeaway?&amp;nbsp;&lt;strong style=&quot;color: black; font-style: normal; font-weight: bold;&quot;&gt;Always use K&amp;amp;R style braces in JavaScript&lt;/strong&gt;, even if it’s not the style you prefer in other languages.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Allman braces bring zero objective value to the table. Using them out of personal preference isn’t worth the mental overhead of consistently remembering that they break when returning object literals, nor the debugging morass that will inevitably crop up when you aren’t paying close attention and muscle memory takes over.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://encosia.com/in-javascript-curly-brace-placement-matters-an-example/&quot;&gt;http://encosia.com/in-javascript-curly-brace-placement-matters-an-example/&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/8331708304112648104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/08/in-javascript-curly-brace-placement.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/8331708304112648104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/8331708304112648104'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/08/in-javascript-curly-brace-placement.html' title='In JavaScript, curly brace placement matters: An example'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-1527662164490876447</id><published>2011-07-29T09:43:00.000-07:00</published><updated>2011-07-29T09:43:17.735-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>JQuery sortable draggable bug.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;JQuery sortable Update event calls twice when you bind it to class, not to id and when you drag item to other connectable block.&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;Jquery&lt;/legend&gt;&lt;br /&gt;
$(&quot;.MyClass1, .MyClass2&quot;).sortable({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; connectWith: &quot;.connectedSortable&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; update: function (event, ui) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&quot;twice!&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }})&lt;/fieldset&gt;&lt;br /&gt;
&lt;br /&gt;
Very simple solution is to change event &quot;update&quot; to &quot;stop&quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;Jquery&lt;/legend&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;$(&quot;.MyClass1, .MyClass2&quot;).sortable({&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; connectWith: &quot;.connectedSortable&quot;,&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; stop: function (event, ui) {&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&quot;once!&quot;);&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }})&lt;/div&gt;&lt;/fieldset&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/1527662164490876447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/07/jquery-sortable-draggable-bug.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/1527662164490876447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/1527662164490876447'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/07/jquery-sortable-draggable-bug.html' title='JQuery sortable draggable bug.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-5366416060206410569</id><published>2011-07-27T12:34:00.000-07:00</published><updated>2011-07-27T12:34:56.321-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Framework"/><title type='text'>Entity Framework. &quot;New transaction is not allowed because there are other threads running in the session.&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;Task:&lt;/b&gt; Resolve error.&lt;br /&gt;
&lt;b&gt;Solution:&lt;/b&gt; Use new context to update item in iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Explanation:&lt;/b&gt;&lt;br /&gt;
This exception occurs in the following code:&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;C#&lt;/legend&gt;&lt;br /&gt;
MyContext db=new MyContext();&lt;br /&gt;
var ListOfEntities=from p in db.Entity select p;&lt;br /&gt;
foreach(var item in&amp;nbsp;ListOfEntities)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; item.Text=&quot;Changed!&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; db.SaveChanges();&lt;br /&gt;
}&lt;/fieldset&gt;&lt;br /&gt;
&lt;br /&gt;
In the following example it will be OK:&lt;br /&gt;
&lt;br /&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;fieldset&gt;&lt;legend&gt;C#&lt;/legend&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;MyContext db=new MyContext();&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;var ListOfEntities=from p in db.Entity select p;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;foreach(var item in&amp;nbsp;ListOfEntities)&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; MyContext&amp;nbsp;anotherDB =new&amp;nbsp;MyContext();&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; var MyItem=(from p in anotherDB where p.ID=item.ID select p).FirstOrDefault();&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; MyItem.Text=&quot;Changed!&quot;;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; anotherDB.SaveChanges();&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;}&lt;/div&gt;&lt;/fieldset&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/5366416060206410569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/07/entity-framework-new-transaction-is-not.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/5366416060206410569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/5366416060206410569'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/07/entity-framework-new-transaction-is-not.html' title='Entity Framework. &quot;New transaction is not allowed because there are other threads running in the session.&quot;'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-215830870180568707</id><published>2011-07-13T12:26:00.000-07:00</published><updated>2011-07-13T12:26:01.476-07:00</updated><title type='text'>ASP.NET MVC 3 bug (Html helpers)</title><content type='html'>If your model has ID parameter then Html helper will replace it with ID from QueryString.&lt;br /&gt;
It will take from here ==&amp;gt; &quot;/MyControler/someaction/ID&quot;&lt;br /&gt;
not from here ==&amp;gt; &quot;model=&amp;gt;model.ID&quot;&lt;br /&gt;
&lt;br /&gt;
Solution: Write your html inputs yourself if you have ID parameter in Model.</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/215830870180568707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/07/aspnet-mvc-3-bug-html-helpers.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/215830870180568707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/215830870180568707'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/07/aspnet-mvc-3-bug-html-helpers.html' title='ASP.NET MVC 3 bug (Html helpers)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-6745612273246421301</id><published>2011-04-21T07:00:00.000-07:00</published><updated>2011-04-21T07:00:20.671-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>JQuery clone elements</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;TASK: &lt;/b&gt;&lt;br /&gt;
Clone DOM elements.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SOLUTION: &lt;/b&gt;&lt;br /&gt;
Use .clone() and .appendTo().&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXPLANATION: &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In the following example we copy DOM element &quot;.from_to_copy&quot; to &quot;.where_to_copy&quot; without typed data and without javascript&#39;s bindings.&lt;br /&gt;
&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;JQuery&lt;/legend&gt;&lt;br /&gt;
$(&quot;.from_to_copy&quot;).clone().appendTo(&quot;.where_to_copy&quot;);&lt;/fieldset&gt;&lt;br /&gt;
In this example we copy DOM element with data typed and javascript&#39;s bindigs.&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;JQuery&lt;/legend&gt;&lt;br /&gt;
$(&quot;.from_to_copy&quot;).clone(true).appendTo(&quot;.where_to_copy&quot;);&lt;/fieldset&gt;&lt;br /&gt;
Just change default &quot;.clone()&quot; to &quot;.clone(true)&quot;.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/6745612273246421301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-clone-elements.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/6745612273246421301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/6745612273246421301'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-clone-elements.html' title='JQuery clone elements'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-2586392771127266602</id><published>2011-04-18T23:51:00.000-07:00</published><updated>2011-04-18T23:51:05.350-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>JQuery detection of browser</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;TASK:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Fix something or do special instructions according to browser type.&lt;br /&gt;
&lt;b&gt;SOLUTION:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Use the flags of $.browser:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;$.browser.webkit&lt;/li&gt;
&lt;li&gt;$.browser.safari (deprecated)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;$.browser.opera&lt;/li&gt;
&lt;li&gt;$.browser.msie&lt;/li&gt;
&lt;li&gt;$.browser.mozilla&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Also, we can detect version of browser using $.browser.version&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jquery.browser&lt;/b&gt; and &lt;b&gt;$.browser&lt;/b&gt; are synonymous.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXAMPLE:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;JQuery&lt;/legend&gt;&lt;br /&gt;
if ($.browser.mozilla)&lt;br /&gt;
{&lt;br /&gt;
alert(&quot;The browser is mozilla&quot;);&lt;br /&gt;
}&lt;/fieldset&gt;&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;JQuery&lt;/legend&gt;&lt;br /&gt;
if ($.browser.msie)&lt;br /&gt;
{&lt;br /&gt;
alert(&quot;The browser is Internet Explorer, version:&quot; + $.browser.version);&lt;br /&gt;
}&lt;/fieldset&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/2586392771127266602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-detection-of-browser.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/2586392771127266602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/2586392771127266602'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-detection-of-browser.html' title='JQuery detection of browser'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-6061527874006113927</id><published>2011-04-13T06:39:00.000-07:00</published><updated>2011-04-13T06:41:37.926-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>JQuery select element at index n</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;TASK: &lt;/b&gt;&lt;br /&gt;
Select the element at index n within the matched set.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;SOLUTION:&lt;/b&gt;&lt;br /&gt;
$(&quot;.example:eq(&quot;+index+&quot;)&quot;).css(&quot;color&quot;, &quot;red&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXAMPLE:&lt;/b&gt;&lt;br /&gt;
Select element at index 1 and set css property &quot;color&quot; to &quot;red&quot;:&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;JQuery&lt;/legend&gt;&lt;br /&gt;
var index=1;&lt;br /&gt;
$(&quot;.example:eq(&quot;+index+&quot;)&quot;).css(&quot;color&quot;, &quot;red&quot;);&lt;br /&gt;
&lt;/fieldset&gt;&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;HTML&lt;/legend&gt;&lt;br /&gt;
&amp;lt;div class=&quot;example&quot;&amp;gt;div index 0&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;example&quot;&amp;gt;div index 1&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;example&quot;&amp;gt;div index 2&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;/fieldset&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/6061527874006113927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-select-element-at-index-n.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/6061527874006113927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/6061527874006113927'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-select-element-at-index-n.html' title='JQuery select element at index n'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-8564126903333084664</id><published>2011-04-13T06:23:00.000-07:00</published><updated>2011-04-13T06:24:23.378-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>JQuery index of element</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;TASK:&lt;/b&gt;&lt;br /&gt;
Recognize index of element in group on which we clicked.&lt;br /&gt;
&lt;b&gt;SOLUTION:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
$(&quot;#parent child&quot;).index(this);&lt;br /&gt;
&lt;b&gt;EXAMPLE&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;JQuery&lt;/legend&gt;&lt;br /&gt;
$(document).ready(function() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&quot;#example div&quot;).click(function() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var index = $(&quot;#example div&quot;).index(this);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&quot;#example_index&quot;).html(&quot;Index &quot; + index + &quot; was clicked&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;br /&gt;
&lt;br /&gt;
});&lt;/fieldset&gt;&lt;br /&gt;
&lt;fieldset&gt;&lt;legend&gt;HTML&lt;/legend&gt;&lt;br /&gt;
&amp;lt;div id=&quot;example&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;div index 0&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;div index 1&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;div index 2&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;div index 3&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;div index 4&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&quot;example_index&quot;&amp;gt;Click one of the above divs&amp;lt;/div&amp;gt;&lt;/fieldset&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/8564126903333084664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-index-of-element.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/8564126903333084664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/8564126903333084664'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/04/jquery-index-of-element.html' title='JQuery index of element'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-5333020236369222034</id><published>2011-04-11T07:38:00.000-07:00</published><updated>2011-04-11T07:48:00.135-07:00</updated><title type='text'>HTML IE conditional comments</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;TASK:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Tell&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #070606; font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre;&quot;&gt;special instructions for IE. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SOLUTION:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[if IE 6]&amp;gt;&lt;br /&gt;
Special instructions for IE 6 here&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXPLANATION:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #242424; font-family: georgia, times, serif; font-size: 13px; font-weight: normal; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ol class=&quot;spacing&quot; style=&quot;border-bottom-color: rgb(145, 152, 193); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(145, 152, 193); border-left-style: dotted; border-left-width: 0px; border-right-color: rgb(145, 152, 193); border-right-style: dotted; border-right-width: 0px; border-top-color: rgb(145, 152, 193); border-top-style: dotted; border-top-width: 1px; padding-bottom: 1em;&quot;&gt;&lt;li class=&quot;&quot; style=&quot;margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;&lt;b&gt;Their basic structure is the same as an HTML comment (&lt;code style=&quot;background-color: #f1f3f9; font-size: 12px;&quot;&gt;&amp;lt;!-- --&amp;gt;&lt;/code&gt;). Therefore all other browsers will see them as normal comments and will ignore them entirely.&lt;/b&gt;&lt;/li&gt;
&lt;li class=&quot;odd&quot; style=&quot;background-color: #f2f3ef; margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;&lt;b&gt;Explorer Windows, though, has been programmed to recognize the special&amp;nbsp;&lt;code style=&quot;background-color: inherit; font-size: 12px;&quot;&gt;&amp;lt;!--[if IE]&amp;gt;&lt;/code&gt;&amp;nbsp;syntax, resolves the&amp;nbsp;&lt;code style=&quot;background-color: inherit; font-size: 12px;&quot;&gt;if&lt;/code&gt;&amp;nbsp;and parses the content of the conditional comment as if it were normal page content.&lt;/b&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;&lt;b&gt;Since conditional comments use the&amp;nbsp;&lt;b&gt;HTML&lt;/b&gt;&amp;nbsp;comment structure, they can only be included in HTML files, and not in CSS files. I&#39;d have preferred to put the special styles in the CSS file, but that&#39;s impossible. You can also put an entire new&amp;nbsp;&lt;code style=&quot;background-color: #f1f3f9; font-size: 12px;&quot;&gt;&amp;lt;link&amp;gt;&lt;/code&gt;&amp;nbsp;tag in the conditional comment referring to an extra style sheet.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;h3 id=&quot;link1&quot; style=&quot;clear: left; margin-top: 2em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;h4 id=&quot;link3&quot; style=&quot;clear: left; font-size: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;The syntax I use is:&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;div &quot;=&quot;&quot; style=&quot;border-bottom-color: rgb(145, 152, 193); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(145, 152, 193); border-left-style: dotted; border-left-width: 0px; border-right-color: rgb(145, 152, 193); border-right-style: dotted; border-right-width: 0px; border-top-color: rgb(145, 152, 193); border-top-style: dotted; border-top-width: 1px; font-size: 13px; font-weight: normal; font-weight: normal; padding-bottom: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if IE]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if IE 6]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer 6&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if IE 7]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer 7&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if gte IE 6]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer 6 and up&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if lt IE 6]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer lower than 6&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if lte IE 6]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer lower or equal to 6&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!--[if gt IE 6]&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;According to the conditional comment this is Internet Explorer greater than 6&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;Note the special syntax:&lt;/b&gt;&lt;/div&gt;&lt;ul style=&quot;border-bottom-color: rgb(145, 152, 193); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(145, 152, 193); border-left-style: dotted; border-left-width: 0px; border-right-color: rgb(145, 152, 193); border-right-style: dotted; border-right-width: 0px; border-top-color: rgb(145, 152, 193); border-top-style: dotted; border-top-width: 1px; font-weight: normal; padding-bottom: 1em;&quot;&gt;&lt;li class=&quot;&quot; style=&quot;font-size: 13px; margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;gt: greater than&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;font-size: 13px; margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;gte:greater than or equal to&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;font-size: 13px; margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;lt:less than&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;font-size: 13px; margin-left: -1.5em; padding-bottom: 0.4em; padding-left: 0.4em; padding-right: 0.4em; padding-top: 0.4em;&quot;&gt;lte: less than or equal to&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://website-howto.blogspot.com/feeds/5333020236369222034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://website-howto.blogspot.com/2011/04/html-ie-conditional-comments.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/5333020236369222034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/5333020236369222034'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/04/html-ie-conditional-comments.html' title='HTML IE conditional comments'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8196372891419318492.post-188416650040968000</id><published>2011-04-10T02:00:00.000-07:00</published><updated>2011-04-10T03:07:40.777-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>CSS underline</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;b&gt;Task:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Change space between word and bottom line in link element (&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
a {&lt;br /&gt;
padding-bottom: 10px; //space between word and line&lt;br /&gt;
color: #555;&lt;br /&gt;
text-decoration: none;&lt;br /&gt;
border-bottom: 1px solid #555;&lt;br /&gt;
}&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/188416650040968000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8196372891419318492/posts/default/188416650040968000'/><link rel='alternate' type='text/html' href='http://website-howto.blogspot.com/2011/04/css-underline.html' title='CSS underline'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>