<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Select Box replacement</title>
	<atom:link href="http://www.brainfault.com/2007/07/23/select-box-replacement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brainfault.com/2007/07/23/select-box-replacement/</link>
	<description>Just another blog</description>
	<lastBuildDate>Wed, 17 Mar 2010 04:52:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: RenÃ©</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-664</link>
		<dc:creator>RenÃ©</dc:creator>
		<pubDate>Fri, 20 Nov 2009 09:17:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-664</guid>
		<description>event.preventDefault() does not work for Enter in Firefox as mentioned under &quot;Known issues&quot;.

I solved the problem by adding the following code below the .keydown event handler:

.keypress(function(event) {
	    if(event.keyCode == 13) {
               event.stopPropagation(); 
               $(&#039;li.&#039; + opt.hoverClass).trigger(&#039;click&#039;);
	    }
	})</description>
		<content:encoded><![CDATA[<p>event.preventDefault() does not work for Enter in Firefox as mentioned under &#8220;Known issues&#8221;.</p>
<p>I solved the problem by adding the following code below the .keydown event handler:</p>
<p>.keypress(function(event) {<br />
	    if(event.keyCode == 13) {<br />
               event.stopPropagation();<br />
               $(&#8216;li.&#8217; + opt.hoverClass).trigger(&#8216;click&#8217;);<br />
	    }<br />
	})</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RenÃ©</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-662</link>
		<dc:creator>RenÃ©</dc:creator>
		<pubDate>Tue, 17 Nov 2009 15:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-662</guid>
		<description>I had an issue where dropdownlists (ASP.Net) using selectbox where not firing onchange when AutoPostBack was set to true.

The try/catch is ugly which I am aware of but IE failed trying to validate attached validators which where not there.

The solution was changing the following code:
.click(function(event) {
    var fl = $(&#039;li.&#039; + opt.hoverClass, $container).get(0);
    if (opt.debug) console.log(&#039;click on :&#039; + this.id);
    $(&#039;li.&#039; + opt.currentClass, $container).removeClass(opt.currentClass);
    $(this).addClass(opt.currentClass);
    setCurrent();
    $select.get(0).blur();
    hideMe();
    try{
        $select.change();
    }
    catch(err){}</description>
		<content:encoded><![CDATA[<p>I had an issue where dropdownlists (ASP.Net) using selectbox where not firing onchange when AutoPostBack was set to true.</p>
<p>The try/catch is ugly which I am aware of but IE failed trying to validate attached validators which where not there.</p>
<p>The solution was changing the following code:<br />
.click(function(event) {<br />
    var fl = $(&#8216;li.&#8217; + opt.hoverClass, $container).get(0);<br />
    if (opt.debug) console.log(&#8216;click on :&#8217; + this.id);<br />
    $(&#8216;li.&#8217; + opt.currentClass, $container).removeClass(opt.currentClass);<br />
    $(this).addClass(opt.currentClass);<br />
    setCurrent();<br />
    $select.get(0).blur();<br />
    hideMe();<br />
    try{<br />
        $select.change();<br />
    }<br />
    catch(err){}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jamus</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-500</link>
		<dc:creator>jamus</dc:creator>
		<pubDate>Tue, 01 Sep 2009 15:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-500</guid>
		<description>This is great!

Just thought I&#039;d mention the known issue isn&#039;t an issue on my safari 4.0.2 (on mac).</description>
		<content:encoded><![CDATA[<p>This is great!</p>
<p>Just thought I&#8217;d mention the known issue isn&#8217;t an issue on my safari 4.0.2 (on mac).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: axel</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-496</link>
		<dc:creator>axel</dc:creator>
		<pubDate>Sun, 16 Aug 2009 16:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-496</guid>
		<description>this is doing the onChange trick for me, let me know if there is a better way to do it.
xs 

 function setCurrent() {  
    var li = $(&quot;li.&quot;+opt.hoverClass, $container).get(0);
    var ar = (&#039;&#039;+li.id).split(&#039;_&#039;);
    var el = ar[ar.length-1];
    $select.val(el);
    if ($input.val() != $(li).html())
      $(&quot;#&quot;+$input.attr(&quot;id&quot;)).trigger(&quot;change&quot;);
    $input.val($(li).html());
    return true;
  }</description>
		<content:encoded><![CDATA[<p>this is doing the onChange trick for me, let me know if there is a better way to do it.<br />
xs </p>
<p> function setCurrent() {<br />
    var li = $(&#8220;li.&#8221;+opt.hoverClass, $container).get(0);<br />
    var ar = (&#8221;+li.id).split(&#8216;_&#8217;);<br />
    var el = ar[ar.length-1];<br />
    $select.val(el);<br />
    if ($input.val() != $(li).html())<br />
      $(&#8220;#&#8221;+$input.attr(&#8220;id&#8221;)).trigger(&#8220;change&#8221;);<br />
    $input.val($(li).html());<br />
    return true;<br />
  }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-478</link>
		<dc:creator>Luis</dc:creator>
		<pubDate>Wed, 01 Jul 2009 14:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-478</guid>
		<description>Hi! Just a tip! I think you forget to put the css file in the download zip! I resolved getting the css file of the example. But I think you should put it in the zip too.</description>
		<content:encoded><![CDATA[<p>Hi! Just a tip! I think you forget to put the css file in the download zip! I resolved getting the css file of the example. But I think you should put it in the zip too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Mooney</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-471</link>
		<dc:creator>Geoff Mooney</dc:creator>
		<pubDate>Sun, 28 Jun 2009 06:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-471</guid>
		<description>IE7 &amp; IE8, the scroll bar does not work, this reproducible even on this sites demo page just by adding more options to the select</description>
		<content:encoded><![CDATA[<p>IE7 &amp; IE8, the scroll bar does not work, this reproducible even on this sites demo page just by adding more options to the select</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mr. Extendaquin</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-447</link>
		<dc:creator>mr. Extendaquin</dc:creator>
		<pubDate>Tue, 05 May 2009 11:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-447</guid>
		<description>Man thanx for this, have been looking for a quick and easy method for my drop downs.</description>
		<content:encoded><![CDATA[<p>Man thanx for this, have been looking for a quick and easy method for my drop downs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chemix</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-444</link>
		<dc:creator>chemix</dc:creator>
		<pubDate>Tue, 28 Apr 2009 18:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-444</guid>
		<description>Quick update for onchange compatibility

function setCurrent() {
		var li = $(&quot;li.&quot;+opt.currentClass, $container).get(0);
		var ar = (&#039;&#039;+li.id).split(&#039;_&#039;);
		var el = ar[ar.length-1];
		$select.val(el);
		$input.val($(li).html());
		//chemix
		$select.change();
		return true;
	}</description>
		<content:encoded><![CDATA[<p>Quick update for onchange compatibility</p>
<p>function setCurrent() {<br />
		var li = $(&#8220;li.&#8221;+opt.currentClass, $container).get(0);<br />
		var ar = (&#8221;+li.id).split(&#8216;_&#8217;);<br />
		var el = ar[ar.length-1];<br />
		$select.val(el);<br />
		$input.val($(li).html());<br />
		//chemix<br />
		$select.change();<br />
		return true;<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yAnTar</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-409</link>
		<dc:creator>yAnTar</dc:creator>
		<pubDate>Tue, 10 Mar 2009 16:09:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-409</guid>
		<description>If replace 
$select.children(&#039;option&#039;).each(function() {
on
$select.find(&#039;option&#039;).each(function() {
then partially work with optgroup</description>
		<content:encoded><![CDATA[<p>If replace<br />
$select.children(&#8216;option&#8217;).each(function() {<br />
on<br />
$select.find(&#8216;option&#8217;).each(function() {<br />
then partially work with optgroup</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aladin</title>
		<link>http://www.brainfault.com/2007/07/23/select-box-replacement/comment-page-1/#comment-395</link>
		<dc:creator>aladin</dc:creator>
		<pubDate>Thu, 19 Feb 2009 19:57:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfault.com/2007/07/23/select-box-replacement/#comment-395</guid>
		<description>great work, just what I needed.
I only did some changes so it shows text inside the textbox and not html like &quot;&#160;test&#160;&quot;


function setCurrent() {
	var li = $(&quot;li.&quot;+opt.hoverClass, $container).get(0);
	var ar = (&#039;&#039;+li.id).split(&#039;_&#039;);
	var el = ar[ar.length-1];
	$select.val(el);
	$input.val($(li).text());//instead of $input.val($(li).html());
	//which seemed to had problems with whitespaces
		return true;
	}</description>
		<content:encoded><![CDATA[<p>great work, just what I needed.<br />
I only did some changes so it shows text inside the textbox and not html like &#8220;&nbsp;test&nbsp;&#8221;</p>
<p>function setCurrent() {<br />
	var li = $(&#8220;li.&#8221;+opt.hoverClass, $container).get(0);<br />
	var ar = (&#8221;+li.id).split(&#8216;_&#8217;);<br />
	var el = ar[ar.length-1];<br />
	$select.val(el);<br />
	$input.val($(li).text());//instead of $input.val($(li).html());<br />
	//which seemed to had problems with whitespaces<br />
		return true;<br />
	}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
