Bug Tracker

Opened 10 years ago

Closed 10 years ago

#6606 closed bug (worksforme)

jQuery(selector).val("") does not set value=""

Reported by: seasong Owned by:
Priority: Milestone: 1.4.3
Component: manipulation Version: 1.4.2
Keywords: empty string false val Cc:
Blocked by: Blocking:

Description

jQuery(selector).val() returns the value of the element in question, and does not alter the value at all, as it should.

jQuery(selector).val("") does exactly the same thing, however - you might as well not include the quote marks.

I have been getting around this with:

jQuery(selector).get(0).value = ""

While that *works*, I would prefer to not have to jump out of the jQuery object (and thus the jQuery mindset) to get something so basic done.

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: worksforme
Status: newclosed

This works for me, if it doesn't work for you please submit a test case.

Note: See TracTickets for help on using tickets.