class (Object) vs id
<p>During the web development i encountered with many problems and resolved it but these problems gave me a thought which i want to share and would like to know your view.</p>

<p>Which One is efficient <code>Class Or ID</code> : Both has own specification but i think Class is more convenient over ID (if you are dealing with thousands of IDs.)
I know Id is quite efficient for DOM Traversing but what if you have hundreds of elements with IDs, How do you manage ? </p>

<p>Using CLASS : One class can be derived by many elements and the individual elements can be dealt by using <code>"this" object</code>. </p>

<p>I am curious to know your view OR how do you handle the project/projects when you have many-many elements with ID or Class name</p>

<pre><code>&lt;div class="example" onclick="function click(this);"&gt; &lt;/div&gt;  
&lt;div class="example" onclick="function click(this);"&gt; &lt;/div&gt; 
&lt;div class="example" onclick="function click(this);"&gt; &lt;/div&gt;


    function click(obj){
        alert(obj.classname + "We can access any individual element by using Object");   
       }

&lt;div id="exm_1"&gt; &lt;/div&gt; 
&lt;div id="exm_2"&gt; &lt;/div&gt; 
&lt;div id="exm_3"&gt; &lt;/div&gt; 

but in case of ID, we go through each ID
</code></pre>
