Jamen Jamen - 4 years ago 140
Javascript Question

How to make an element's content editable with JavaScript (or jQuery)

How would I make it so the content of an element could be made editable through native JavaScript (DOM) and/or jQuery?

Answer Source

Solution to toggle editable on/off using a click handler:

    var $div=$('div'), isEditable=$div.is('.editable');


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download