title: Get value of selected <option> in ddSlick dropdown
body: <p>This currently returns undefined. What should go in the commented line to alert the value (1, 2, 3 or 4) of the current <code>&lt;option&gt;</code> tag?</p>
  
  <pre><code>&lt;select id="dropdown" name="dropdown"&gt;
          &lt;option value="0" data-imagesrc="images/icons/all.png"&gt;All Questions&lt;/option&gt;
          &lt;option value="1" id="friends" data-imagesrc="images/icons/friends.png"&gt;Friends&lt;/option&gt;
          &lt;option value="2" data-imagesrc="images/icons/friends_of_friends.png"&gt;Friends of Friends&lt;/option&gt;
          &lt;option value="3" data-imagesrc="images/icons/network.png"&gt;&lt;?php echo $network; ?&gt;&lt;/option&gt;
          &lt;option value="4" data-imagesrc="images/icons/location.png"&gt;&lt;?php echo $location ?&gt;&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;script type="text/javascript"&gt;
  $('#dropdown').ddslick({
  showSelectedHTML: false,
      onSelected: function(selectedData){
      var str = $(this).attr('id'); // WHAT SHOULD GO HERE?
      alert(str);
      }   
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>If it's relevant, I'm using <a href="http://designwithpc.com/Plugins/ddSlick" rel="nofollow noreferrer">this plugin</a>.</p>
  
  <p>Perhaps <a href="https://stackoverflow.com/questions/11453578/ddslick-select-options-wonst-post-value-of-selected-option-jquery-plugin">this question</a> might help. I'm trying to make sense of it.</p>
  
  <p>Managed to figure this out. Final working code is:</p>
  
  <pre><code>&lt;select id="dropdown" name="dropdown" value="hello"&gt;
          &lt;option value="0" data-imagesrc="images/icons/all.png"&gt;All Questions&lt;/option&gt;
          &lt;option value="1" id="friends" data-imagesrc="images/icons/friends.png"&gt;Friends&lt;/option&gt;
          &lt;option value="2" data-imagesrc="images/icons/friends_of_friends.png"&gt;Friends of Friends&lt;/option&gt;
          &lt;option value="3" data-imagesrc="images/icons/network.png"&gt;&lt;?php echo $network; ?&gt;&lt;/option&gt;
          &lt;option value="4" data-imagesrc="images/icons/location.png"&gt;&lt;?php echo $location ?&gt;&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;script type="text/javascript"&gt;
  $('#dropdown').ddslick({
      showSelectedHTML: false,
      onSelected: function(data){
          alert(data.selectedData.value);
      }   
  });
  &lt;/script&gt;
  </code></pre>