<?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: jQuery: Get the Selected Option Text</title>
	<atom:link href="/2010/06/22/jquery-get-the-selected-option-text/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/06/22/jquery-get-the-selected-option-text/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Adi</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-387345</link>
		<dc:creator><![CDATA[Adi]]></dc:creator>
		<pubDate>Wed, 02 Dec 2015 19:08:54 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-387345</guid>
		<description><![CDATA[Hello. Is it possible to show a div with the value instead of the popup alert?]]></description>
		<content:encoded><![CDATA[<p>Hello. Is it possible to show a div with the value instead of the popup alert?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chips</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-16329</link>
		<dc:creator><![CDATA[Chips]]></dc:creator>
		<pubDate>Fri, 13 Jul 2012 07:44:57 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-16329</guid>
		<description><![CDATA[Thanks a lot]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luu Tai</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-16216</link>
		<dc:creator><![CDATA[Luu Tai]]></dc:creator>
		<pubDate>Wed, 04 Jul 2012 08:47:19 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-16216</guid>
		<description><![CDATA[If you wanna get the index of one item in the list

&lt;pre lang=&quot;javascript&quot;&gt;
$(document).ready(function(){
  $(&quot;option&quot;).click(function(){
    alert($(this).index());
  });
});
&lt;/pre&gt;

Thỏa thuận
Cụ thể
Trong khoảng




]]></description>
		<content:encoded><![CDATA[<p>If you wanna get the index of one item in the list</p>
<pre lang="javascript">
$(document).ready(function(){
  $("option").click(function(){
    alert($(this).index());
  });
});
</pre>
<p>Thỏa thuận<br />
Cụ thể<br />
Trong khoảng</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-15970</link>
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sun, 10 Jun 2012 20:40:55 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-15970</guid>
		<description><![CDATA[You completed my day. Have been searching for this from past 2 hours and at last I found it. Thank you for the tips.]]></description>
		<content:encoded><![CDATA[<p>You completed my day. Have been searching for this from past 2 hours and at last I found it. Thank you for the tips.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladzeem</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-15779</link>
		<dc:creator><![CDATA[Vladzeem]]></dc:creator>
		<pubDate>Tue, 15 May 2012 20:02:09 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-15779</guid>
		<description><![CDATA[Guys, I was trying any of solution you have provided on my aspx page but nothing work -
returns are &quot;undefined&quot; for value or &quot;null&quot; for html 

Please advise.

Thanks]]></description>
		<content:encoded><![CDATA[<p>Guys, I was trying any of solution you have provided on my aspx page but nothing work &#8211;<br />
returns are &#8220;undefined&#8221; for value or &#8220;null&#8221; for html </p>
<p>Please advise.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satyricon65</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-15162</link>
		<dc:creator><![CDATA[Satyricon65]]></dc:creator>
		<pubDate>Mon, 27 Feb 2012 14:24:29 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-15162</guid>
		<description><![CDATA[Better solution, adding a option context:
&lt;pre lang=&quot;javascript&quot;&gt;
	$(&#039;#producer_list&#039;).change(function(){
		console.log($(&#039;option:selected&#039;, this).html());
	});
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Better solution, adding a option context:</p>
<pre lang="javascript">
	$('#producer_list').change(function(){
		console.log($('option:selected', this).html());
	});
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: atabak</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-14997</link>
		<dc:creator><![CDATA[atabak]]></dc:creator>
		<pubDate>Sat, 14 Jan 2012 13:37:46 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-14997</guid>
		<description><![CDATA[easy way:
&lt;pre lang=&quot;javascript&quot;&gt;
value -----&gt;     $(&#039;#my_select :selected&#039;).val();
text   ------&gt;    $(&#039;#my_select :selected&#039;).html();
#myselect = select id
&lt;/pre&gt;
-----------------------------------
for test:
&lt;pre lang=&quot;javascript&quot;&gt;
onchange=&quot;alert($(&#039;#my_select :selected&#039;).html());&quot;
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>easy way:</p>
<pre lang="javascript">
value ----->     $('#my_select :selected').val();
text   ------>    $('#my_select :selected').html();
#myselect = select id
</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
for test:</p>
<pre lang="javascript">
onchange="alert($('#my_select :selected').html());"
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-13170</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Wed, 23 Jun 2010 11:40:53 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-13170</guid>
		<description><![CDATA[Works like a charm! Thanks for sharing!]]></description>
		<content:encoded><![CDATA[<p>Works like a charm! Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Pascarello</title>
		<link>/2010/06/22/jquery-get-the-selected-option-text/comment-page-1/#comment-13169</link>
		<dc:creator><![CDATA[Eric Pascarello]]></dc:creator>
		<pubDate>Wed, 23 Jun 2010 03:39:41 +0000</pubDate>
		<guid isPermaLink="false">/?p=1660#comment-13169</guid>
		<description><![CDATA[More ways to get to the text:
&lt;pre lang=&quot;javascript&quot;&gt;
jQuery(&quot;#my-select&quot;).change(
    function(){
        var txt1 = jQuery(this).find(&quot;option:selected&quot;).attr(&quot;text&quot;);
        var txt2 = jQuery(this).find(&quot;option:selected&quot;).text();
        alert(txt1 + &quot;\n&quot; + txt2);
    }
)
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>More ways to get to the text:</p>
<pre lang="javascript">
jQuery("#my-select").change(
    function(){
        var txt1 = jQuery(this).find("option:selected").attr("text");
        var txt2 = jQuery(this).find("option:selected").text();
        alert(txt1 + "\n" + txt2);
    }
)
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
