Below is my html Dom.I want to fetch data attribute of select option.
<table class="fanpage-table">
<tbody>
<tr>
<td>Blog System...</td>
<td>History......</td>
<td>
<select name="brand_dropdown">
<option data-brand-id="xxxthisxxxxxxx">PKB</option>
<option data-brand-id="xxxthisxxxxxxx">QKJ</option>
</select>
</td>
<td><i class="fa fa-check-square-o save-fan-page" data-fanpage-id="xxxxxxxxxx"></i></td>
</tr>
</tbody>
</table>
To fetch data-brand-id my following JQuery is not working.
$(".save-fan-page").on("click",function()
{
$(this).closest("tr").find("select[name='brand_dropdown']option:selected").data("brand-id");
}