SyntaxFix
Write A Post
Hire A Developer
Questions
One correct way to get selected value would be
var selected_value = $('#fruit_name').val()
And then you should do
if(selected_value) { ... }