<?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 Id of the Current Element</title>
	<atom:link href="/2010/03/31/jquery-get-the-id-of-the-current-element/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/03/31/jquery-get-the-id-of-the-current-element/</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: rajavel</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-461724</link>
		<dc:creator><![CDATA[rajavel]]></dc:creator>
		<pubDate>Fri, 11 Aug 2017 09:27:47 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-461724</guid>
		<description><![CDATA[$(&#039;element&#039;).click(function() {
    alert($(this).attr(&#039;id&#039;));
} 
above   code  not workin.

pls help how to get current element value.]]></description>
		<content:encoded><![CDATA[<p>$(&#8216;element&#8217;).click(function() {<br />
    alert($(this).attr(&#8216;id&#8217;));<br />
}<br />
above   code  not workin.</p>
<p>pls help how to get current element value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayaram</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-394737</link>
		<dc:creator><![CDATA[Jayaram]]></dc:creator>
		<pubDate>Thu, 21 Jan 2016 20:35:10 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-394737</guid>
		<description><![CDATA[Thank you man!!! You made my day]]></description>
		<content:encoded><![CDATA[<p>Thank you man!!! You made my day</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prasanna rathnayaka</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-14381</link>
		<dc:creator><![CDATA[prasanna rathnayaka]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 09:58:36 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-14381</guid>
		<description><![CDATA[sorry .. i can&#039;t submit my full code]]></description>
		<content:encoded><![CDATA[<p>sorry .. i can&#8217;t submit my full code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prasanna rathnayaka</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-14378</link>
		<dc:creator><![CDATA[prasanna rathnayaka]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 08:15:50 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-14378</guid>
		<description><![CDATA[// no need to write ready method 
&lt;pre lang=&quot;javascript&quot;&gt;
function getId(id) {
    $(&#039;#&#039; + id).slideToggle(300);
}
&lt;/pre&gt;
]]></description>
		<content:encoded><![CDATA[<p>// no need to write ready method </p>
<pre lang="javascript">
function getId(id) {
    $('#' + id).slideToggle(300);
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: prasanna rathnayaka</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-14377</link>
		<dc:creator><![CDATA[prasanna rathnayaka]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 07:40:25 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-14377</guid>
		<description><![CDATA[// this also working ......
// no need to write ready method. 
&lt;pre lang=&quot;javascript&quot;&gt;
function getId(id) {
    alert(id);
}
&lt;/pre&gt;








]]></description>
		<content:encoded><![CDATA[<p>// this also working &#8230;&#8230;<br />
// no need to write ready method. </p>
<pre lang="javascript">
function getId(id) {
    alert(id);
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasim Padhiyar</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-14329</link>
		<dc:creator><![CDATA[Vasim Padhiyar]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 04:46:27 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-14329</guid>
		<description><![CDATA[how can i get id of all same class element ?]]></description>
		<content:encoded><![CDATA[<p>how can i get id of all same class element ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: buzzknow</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-14183</link>
		<dc:creator><![CDATA[buzzknow]]></dc:creator>
		<pubDate>Tue, 08 Feb 2011 12:07:57 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-14183</guid>
		<description><![CDATA[Hi, usually i use $(selector).attr(&#039;id&#039;); with jquery ...

nice tip :)]]></description>
		<content:encoded><![CDATA[<p>Hi, usually i use $(selector).attr(&#8216;id&#8217;); with jquery &#8230;</p>
<p>nice tip 🙂</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrey Skvortsov</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-12811</link>
		<dc:creator><![CDATA[Andrey Skvortsov]]></dc:creator>
		<pubDate>Sat, 10 Apr 2010 15:48:52 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-12811</guid>
		<description><![CDATA[It&#039;s not work in 1.4.2:

$(function(){
   alert( $(&quot;#zz&quot;).id);
});

ajsiojqijowis
result is &#039;undefined&#039;.]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s not work in 1.4.2:</p>
<p>$(function(){<br />
   alert( $(&#8220;#zz&#8221;).id);<br />
});</p>
<p>ajsiojqijowis<br />
result is &#8216;undefined&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-12801</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Fri, 09 Apr 2010 06:10:23 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-12801</guid>
		<description><![CDATA[Just to reply to all comments, of course I know there&#039;s a &quot;pure&quot; javascript approach and naturally the jQuery&#039;s solution derive from that. Actually if you&#039;d like to access an attribute for a particular element you can use the same notation:

var element = document.getElementById(&#039;element_id&#039;);
alert(element.id);

What jQuery is doing is practically the same, while I was trying the show that sometimes we make it the hard way with $(element).attr() method, which is slow and the notation is not so elegant.

The same happens when you try to access the title, src or whatever attribute you&#039;d like.

best regards,
stoimen]]></description>
		<content:encoded><![CDATA[<p>Just to reply to all comments, of course I know there&#8217;s a &#8220;pure&#8221; javascript approach and naturally the jQuery&#8217;s solution derive from that. Actually if you&#8217;d like to access an attribute for a particular element you can use the same notation:</p>
<p>var element = document.getElementById(&#8216;element_id&#8217;);<br />
alert(element.id);</p>
<p>What jQuery is doing is practically the same, while I was trying the show that sometimes we make it the hard way with $(element).attr() method, which is slow and the notation is not so elegant.</p>
<p>The same happens when you try to access the title, src or whatever attribute you&#8217;d like.</p>
<p>best regards,<br />
stoimen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Long</title>
		<link>/2010/03/31/jquery-get-the-id-of-the-current-element/comment-page-1/#comment-12798</link>
		<dc:creator><![CDATA[Jeff Long]]></dc:creator>
		<pubDate>Fri, 09 Apr 2010 05:42:51 +0000</pubDate>
		<guid isPermaLink="false">/?p=1409#comment-12798</guid>
		<description><![CDATA[This is actually how we got the ids of elements way back when before the days of jQuery, when people actually had to know javascript!]]></description>
		<content:encoded><![CDATA[<p>This is actually how we got the ids of elements way back when before the days of jQuery, when people actually had to know javascript!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
