I am writing an ajax request and I want to use information appended to the html5 data attribute and attach that as a name-value pair for a $_GET request. I know how to set up the ajax request I just cant figure out how to get the value from the html data attribute to a variable in javascript. Here is an example of a link that I have set up with a data attribute that I want to use when clicked in my ajax request.
<a href="hotels.php" id="hr" data-state_hr="5" title="Hotels">Hotels</a>