$(document).ready(function() {
$(document).on('click', '.editable', function(e) {
var caller = $(this);
var currentVal = $(this).text();
var width = $(this).width();
console.log($(caller).offset());
console.log($(caller).position());
var $sizeDiv = $('<div/>', {
class: 'col-xs-12 col-sm-12 col-md-12 col-lg-12'
});
var $input = $('<input/>', {
class: 'form-control',
type: 'text',
value: currentVal,
css: {
position: 'absolute',
top: $(caller).position().top + 5,
left: $(caller).position().left + 5,
'z-index': 10000,
width: $(caller).width()
}
});
$(caller).append($input);
});
});