1

<textarea class="cleditor" name="category_description" id="category_description" rows="3"></textarea>

$("#category_description").val('');
textarea value not clear!!
  • Please, add your requirement how you exactly want to clear textarea. – GNB May 01 '17 at 12:34
  • 1
    Code shown will work fine assuming the textarea exists when you run it. Please provide a [mcve] – charlietfl May 01 '17 at 12:36
  • for those having problem with event handlers, here is a workaround answer. https://stackoverflow.com/questions/8284960/clear-text-area/54265441#54265441 – Neo Jan 19 '19 at 08:50

1 Answers1

0

Try this:

$('#category_description').val('');

It seems to work fine. Are you sure jquery is loaded and you really see the textarea on your screen and not your cleditor?

JSFiddle

If you have the cleditor on your screen, you should probably use:

$('#category_description').cleditor().clear()

This is also described in the getting started when you look in .cleditor(options) Method > cleditor Object > Methods