Make A Div Editable
I need to make a whole div(with class container) editable when the user clicks on the Edit link. Using contenteditable attribute can make a div editable. But it happens only when w
Solution 1:
Updated your jsfiddle example, to the correct class name and it works.
<divclass="container "><divclass="container_settings_inner"><h4class="fred"><divclass="iconnameserver"></div> Test1</h4></div></div>
and
$(document).ready(function() {
$("#edit").click(function()
{
$('.container_settings_inner').attr('contentEditable','true');
});
});
You could put focus on the .container_settings_inner h4 attribute when they become editable so the user knows, or light them up a bit.
Post a Comment for "Make A Div Editable"