Search .attr/variable value with wildcards
<p>fairly new to JQuery, this is easier to explain after you see the code.</p>

<p>HTML:</p>

<pre><code>&lt;table&gt;
    &lt;tr id="1a1"&gt;
        &lt;td&gt;&lt;div class="clickme"&gt;&lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr id="1a2"&gt;
        &lt;td&gt;&lt;div class="clickme"&gt;&lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr id="1b1"&gt;
        &lt;td&gt;&lt;div class="clickme"&gt;&lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Script:</p>

<pre><code>$('.clickme').on('click',function(){
    var trid = $(this).closest('tr').attr('id');
    // Stuck here
});
</code></pre>

<p>What I'm trying to do is when the clickme div is clicked, return the table row ID, check it and do actions based on its name.</p>

<p>So if it starts with 1a, do X, if 1b do Y and so on. </p>
