if I have the html
<select id="autoplay">
<option data-autoplay="">no</option>
<option data-autoplay="1">yes</option>
</select>
how using jQuery can I return the data-autoplay value in respect to which option is selected and set it as a variable var autoplay = *selected value*
so if I select no it returns nothing and if I select yes it returns 1 so var autoplay = "1";