How to remove default text in textarea of ckeditor

When we add ckeditor textarea, it shows default text in the textarea – ‘This is my textarea to be replaced with CKEditor’.

To remove this default text from textarea, just use the below code :


CKEDITOR.instances.TEXTAREAID.setData('');

Advertisements

Check if checkbox if checked or not using jQuery

You can check if the checkbox is checked or not using below code:

  • Checking using checkbox ID.

$('#CHECKBOXID').is(':checked');

  • Checking using checkbox CLASS.

$('.CHECKBOXCLASS').is(':checked');

The above statement will return TRUE if the checkbox is checked and returns FALSE if it is not checked.