<?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: How to get the ID of an element.</title>
	<atom:link href="http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/</link>
	<description>Ran-dumb ramblings of me...</description>
	<lastBuildDate>Tue, 28 Jun 2011 04:37:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Vasim Padhiyar</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-12875</link>
		<dc:creator>Vasim Padhiyar</dc:creator>
		<pubDate>Wed, 01 Jun 2011 04:50:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-12875</guid>
		<description>how to get id of all same class name element ?

for example :






i want to find id of all div from its classname...

thnaks

Vasim Padhiyar</description>
		<content:encoded><![CDATA[<p>how to get id of all same class name element ?</p>
<p>for example :</p>
<p>i want to find id of all div from its classname&#8230;</p>
<p>thnaks</p>
<p>Vasim Padhiyar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astaza</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-10469</link>
		<dc:creator>astaza</dc:creator>
		<pubDate>Sat, 19 Mar 2011 00:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-10469</guid>
		<description>hello how to get and random id for element not have id 
thank you</description>
		<content:encoded><![CDATA[<p>hello how to get and random id for element not have id<br />
thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex L</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-6058</link>
		<dc:creator>Alex L</dc:creator>
		<pubDate>Fri, 17 Sep 2010 21:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-6058</guid>
		<description>I&#039;m trying to do the following:

photoName = $(&quot;#photoName&quot;).attr(&#039;var&#039;);
$(&quot;#&quot; + photoName).remove();

&lt;div id=&quot;&quot;&gt;
&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;
&lt;div id=&quot;photoName&quot; var=&quot;&quot;&gt;
&lt;/a&gt;


can&#039;t make it work.</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to do the following:</p>
<p>photoName = $(&#8220;#photoName&#8221;).attr(&#8216;var&#8217;);<br />
$(&#8220;#&#8221; + photoName).remove();</p>
<p>&lt;div id=&quot;&#8221;&gt;<br />
<a href="#" rel="nofollow"><br />
&lt;div id=&quot;photoName&quot; var=&quot;&#8221;&gt;<br />
</a></p>
<p>can&#8217;t make it work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raviraj Deora</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-5958</link>
		<dc:creator>Raviraj Deora</dc:creator>
		<pubDate>Wed, 08 Sep 2010 12:42:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-5958</guid>
		<description>very helpful..Thanks a lot..</description>
		<content:encoded><![CDATA[<p>very helpful..Thanks a lot..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mekwall</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-5957</link>
		<dc:creator>mekwall</dc:creator>
		<pubDate>Wed, 08 Sep 2010 10:12:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-5957</guid>
		<description>Why make it hard (and slow) when it&#039;s already simple (and fast)?

var currentId = this.id;</description>
		<content:encoded><![CDATA[<p>Why make it hard (and slow) when it&#8217;s already simple (and fast)?</p>
<p>var currentId = this.id;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anup Dutta</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-5828</link>
		<dc:creator>Anup Dutta</dc:creator>
		<pubDate>Thu, 19 Aug 2010 12:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-5828</guid>
		<description>Thanks a lot</description>
		<content:encoded><![CDATA[<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert (Jamie) Munro</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-5493</link>
		<dc:creator>Robert (Jamie) Munro</dc:creator>
		<pubDate>Tue, 27 Jul 2010 11:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-5493</guid>
		<description>@Dylan Are you really saying that:

var RowID = $(this).closest(“tr”).attr(‘id’);
var ErrorDate = $(‘#’ + RowID + ” td.ErrorDate:first”).text() ;

is easier than:

var ErrorDate = $(this).closest(“tr”).find(“td.ErrorDate:first”).text();

If you want to pull more than one piece of data from the row, then, rather than keeping the ID, you shuold keep the jQuery object for the row like:

var $row = $(this).closest(“tr”);
var ErrorDate = $row.find(“td.ErrorDate:first”).text();

@stuntant I agree that using this.id is better in many cases, but it doesn&#039;t work if you want to do somethng like:

$(this).parent().attr(&#039;id&#039;);</description>
		<content:encoded><![CDATA[<p>@Dylan Are you really saying that:</p>
<p>var RowID = $(this).closest(“tr”).attr(‘id’);<br />
var ErrorDate = $(‘#’ + RowID + ” td.ErrorDate:first”).text() ;</p>
<p>is easier than:</p>
<p>var ErrorDate = $(this).closest(“tr”).find(“td.ErrorDate:first”).text();</p>
<p>If you want to pull more than one piece of data from the row, then, rather than keeping the ID, you shuold keep the jQuery object for the row like:</p>
<p>var $row = $(this).closest(“tr”);<br />
var ErrorDate = $row.find(“td.ErrorDate:first”).text();</p>
<p>@stuntant I agree that using this.id is better in many cases, but it doesn&#8217;t work if you want to do somethng like:</p>
<p>$(this).parent().attr(&#8216;id&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-4704</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sat, 29 May 2010 03:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-4704</guid>
		<description>Works! Thanks for your tip dude.</description>
		<content:encoded><![CDATA[<p>Works! Thanks for your tip dude.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morne</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-4567</link>
		<dc:creator>Morne</dc:creator>
		<pubDate>Thu, 13 May 2010 05:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-4567</guid>
		<description>No Em that&#039;s not what he meant :)</description>
		<content:encoded><![CDATA[<p>No Em that&#8217;s not what he meant <img src='http://www.tequilafish.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EM</title>
		<link>http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/comment-page-1/#comment-4337</link>
		<dc:creator>EM</dc:creator>
		<pubDate>Mon, 12 Apr 2010 21:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.tequilafish.com/2007/12/04/jquery-how-to-get-the-id-of-your-current-object/#comment-4337</guid>
		<description>@stuntant ... um... I&#039;m not javascript expert, but don&#039;t you mean:
var currentId = this.getAttribute(&#039;id&#039;)
?</description>
		<content:encoded><![CDATA[<p>@stuntant &#8230; um&#8230; I&#8217;m not javascript expert, but don&#8217;t you mean:<br />
var currentId = this.getAttribute(&#8216;id&#8217;)<br />
?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

