jquery - Set jPicker field to empty value -
im using jpicker color selector in form. have clear value set window/icon 'no color selected' state.
i've tried following:
$(':input[name="color"]').val(''); //access value directly. (does not affect jpicker)
2:
$.jpicker.list[0].color.active.val('hex', '', this); //set color black , input value 000000, instead of empty string
3:
$.jpicker.list[0].color.active.val(null, '', this); //does nothing
none of 3 methods seems behave properly. in advance.
this works me :)
$.jpicker.list[0].color.active.val('v', null);
here example: http://jsfiddle.net/3up7n/
Comments
Post a Comment