fix for val(String) method in jQuery