title: How to implement onClick function with parameters using jquery
body: <p>I have a web-page that can be used to highlight streets in my local area on a street map. The user clicks on the name of the street they are looking for and the street gets highlighted on a map.  See <a href="http://www.fastmap.eu" rel="nofollow">http://www.fastmap.eu</a> for working example.</p>
  
  <p>Each street name is displayed as a button and when the user clicks on the button, 3 variables are stored for use in the map.</p>
  
  <p>Currently, button clicks are handled in html by the onClick function, but it doesn't work on some touch screen devices. So I want to use jQuery .on('click tap', function() instead but don't know how to pass the variables.</p>
  
  <p>The html for each button looks similar to this:-</p>
  
  <pre><code>    &lt;button class="btn" onClick="storeData(value1,value2,value3);location.href='map.html';"&gt;Street Name&lt;/button&gt;
  </code></pre>
  
  <p>Previous answers of a similar nature explain how to pass parameters from on script function to another, but not from the html code and don't show how it is implemented in html.</p>