Skip to main content

Bug Tracker

Side navigation

#6606 closed bug (worksforme)

Opened May 28, 2010 12:38PM UTC

Closed May 29, 2010 01:40PM UTC

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:

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.

Attachments (0)
Change History (1)

Changed May 29, 2010 01:40PM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

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