changing the dropdown option when textbox is clicked
I'm trying to do something like this:
when you click the textbox, the dropdown will reset to the first option, but when you clicked on the dropdown, the text will become empty
but my code won't work
- $('option').click(function(){
$(input[id=edit-title]).val("");
});
- $(input[id=edit-title].click(function(){
- $('option').val('option:first');
- });
Any ideas what's wrong with this code?
Thanks