20 Aug 2013

On select change, get data attribute value

$('select').change(function(){
    alert($(this).data('id'));
});

<select>
    <option data-id="1">one</option>
    <option data-id="2">two</option>
    <option data-id="3">three</option>
</select>

No comments:

Post a Comment

How to Create WEBSITE DESIGN

Way2finder Technologies is a web design studio that offers corporate web design and custom web design. Our website designers offer cheap w...