[jQuery] Dynamically added dom object does not works with jEditable Plugin
I downloaded jEditable from http://www.appelsiini.net/projects/jeditable
I have run the code as
$(".cont").editable(function(value, settings){
return value;
},{submit:'OK'}
);
Afterwards for some reasons, I add the following code
$("body").append("<div class='cont'>aaaa</div>");
But the editable does not works on the same
Then I tried to modify the line in the plugin by including livequery
plugin by changing a particular line from
------------------------------------------------------------------------------------------------
if (!$.isFunction($(this)[settings.event])) {
$.fn[settings.event] = function(fn){
return fn ? this.bind(settings.event, fn) : this.trigger
(settings.event);
}
}
----------------------------------------------------------------------------------------------------------------
to
--------------------------------------------------------------------------------------------------------------------------------
if (!$.isFunction($(this)[settings.event])) {
$.fn[settings.event] = function(fn){
return fn ? this.livequery(settings.event, fn) :
this.trigger(settings.event);
}
}
----------------------------------------------------------------------------------------------------------------
But then also it does not works
Thanks in advance
CSJakharia