how can i trigger action by span id?
<p>How can I trigger action by <code>&lt;span id=</code> in jquery?</p>

<p>my html: </p>

<pre><code>&lt;span id="span-1"&gt;&lt;/span&gt;
&lt;span id="span-2"&gt;&lt;/span&gt;
&lt;span id="span-3"&gt;&lt;/span&gt;
&lt;span id="span-4"&gt;&lt;/span&gt;
</code></pre>

<p>what i've tried     </p>

<pre><code>$('[id^="span-"]').click(function () {
        alert("this_id");
});
</code></pre>
