JQuery match 2 IDs by post-delimiter number
<p>Trying to figure out a way to streamline a script. I have hundreds of icons each with the id "icon_#-#" where the first # relates to a set that particular icon belongs to, and the second # is unique to that icon within the set. Each relates to a box w/ id "box_#-#" where the #-# relates it to a specific icon. For example, #icon_1-1 relates to #box_1_1 and #icon_1-2 relates to #box_1-2. My code is as follows:</p>

<pre><code>    $('#icon_1-1').click(function(){
    $('#box_1-1').fadeIn("500");
    });
</code></pre>

<p>Obviously, using this method I'd have hundreds of lines. Is there a way to streamline, something like:</p>

<pre><code>    $('#icon_[array 1-100]').click(function(){
    $('#box_[array 1-100]').fadeIn("500);
    });
</code></pre>

<p>Thanks!</p>
