<script src="http://code.jquery.com/jquery-latest.js"></script>
<div id="container">
<div class="name">text</div>
</div>
<script>
$(document).ready(function() {
$('.name').on('click',function() {
$('.name').off('click')
$(this).html("<input type='text' >");
return false;
});
});
</script>