Is a correct use of this in javascript?
<p>I used to have this call:</p>

<pre><code>var link = $('&lt;a /&gt;', { 'class': 'prop' + index, title: elt, text: elt });
link.on('click', switchLabel);
</code></pre>

<p>with <code>switchLabel</code> as follow:</p>

<pre><code>function switchLabel(e) {
    $('#' + this.className.replace('prop','corr')).text(this.title);
}
</code></pre>

<p>I just realized that <code>this</code> is quite difficult to understand what it refers to in javascript, so I replaced with:</p>

<pre><code>function switchLabel(e) {
    var source = e.currentTarget;
    $('#' + source.className.replace('prop','corr')).text(source.title);
}
</code></pre>

<p>Am I correct?
Please add some explanation to your answer and we (js noobs) can learn.</p>
