jquery: how to get the value of id attribute?
jquery
Solution
You need to do:
alert($(this).attr('value'));
Problem
Basic jquery question. I have an option element as below. ``` <option class='select_continent' value='7'>Antarctica</option> ``` jquery ``` $(".select_continent").click(function () { alert(this.attr('value')); }); ``` This gives an error saying this.attr is not a function so im not using "this" correctly. How can i get it to alert 7?