title: jQuery selector from a variable
body: <p><strong><a href="http://jsfiddle.net/sr3q00nz/" rel="nofollow">JSFIDDLE LINK</a></strong></p>
  
  <pre><code>var $select = $('select');
  
  $select.on('change', function () {
      var value = $(this).val();
      var modifier = value.split('_')[0];
      var target = modifier + '_target';
  
      console.log(target);
  
      $('div').filter(target).addClass('active');
  
  });
  </code></pre>
  
  <p>If you open console and select any option from the <code>select</code>, you'll see that the text that is thrown to the console is legit (as I want to select <code>modifier1_target</code> depending on the selected option).</p>
  
  <p>However, I can not make a jQuery selector out of this, so as the <code>div</code> is selected and applied an <code>active</code> class.</p>
  
  <p>I tried <code>$(el).attr('class', target)</code> but it didn't work surely.</p>
  
  <p>I am running out of ideas where am I wrong here?</p>