Is there a way to get jQuery selector expression text?
<p>I have an array of selectors like :</p>

<pre><code>var arr = [".discuss .title .post", ".post .desc" , ".eventlist .event"];
</code></pre>

<p>I want to loop through this array and attach a click event on it.</p>

<pre><code>for(var i in arr){
   $(arr[i]).click(function(){
      //here I need the selector i.e. arr[i] expression - for some css work
   });
}
</code></pre>

<p>Is there a way by which I can get this selector expression inside the click callback function?
I went through this post which has similar problem : <a href="http://stackoverflow.com/questions/500246/how-do-i-get-a-jquery-selectors-expression-as-text">How do I get a jQuery selector's expression as text?</a></p>

<p>But as said there, I couldn't find any "selector" attribute of jQuery object. I tried this way:</p>

<pre><code>for(var i in arr){
   $(arr[i]).click(function(){
      console.log(jQuery(this).attr('selector')); //This gives undefined
   });
}
</code></pre>

<p>Any help?</p>
