title: Jquery selecting element by 'data-id'
body: <p>Similar to the <a href="https://stackoverflow.com/questions/19866509/jquery-get-an-element-by-its-data-id">question here</a> , I need to get an element based on its <code>data-id</code>. 
  The problem I encounter is that I  want to retrieve a an a element with a certain <code>data-id</code> using a variable.</p>
  
  <p>lets consider the code below: </p>
  
  <pre><code>var item_id = 12345;
  </code></pre>
  
  <p>if  I want to get the element that has  the <code>data-id</code> with the value of item_id, would I do the following ? </p>
  
  <pre><code>$('[data-id=item_id]')
  </code></pre>
  
  <p>This does not work, and I am kind of stuck on how I can get around this. </p>