I have a form like this:
<select name="category" id="cat">
<option value="cat1" id="hello">Category1</option>
<option value="cat2" id="hello2">Category2</option>
</select>
if i use $('#cat').val() with change function in #cat id , it displays values(cat1 or cat2).
i want to learn how can i get id or Category1(or Category2) ?
the selector :selected will return the selected option in a select element, or an array in case of
multiple="multiple"