Skip to content

Commit 64d77bc

Browse files
lawrencepittuupola
authored andcommitted
Allow ajax calls other than 'html', e.g. json and script calls.
Signed-off-by: Mika Tuupola <tuupola@appelsiini.net>
1 parent 0ddea7f commit 64d77bc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

jquery.jeditable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,14 @@
358358
var ajaxoptions = {
359359
type : 'POST',
360360
data : submitdata,
361+
dataType: 'html',
361362
url : settings.target,
362363
success : function(result, status) {
363-
$(self).html(result);
364+
if (ajaxoptions.dataType == 'html') {
365+
$(self).html(result);
366+
}
364367
self.editing = false;
365-
callback.apply(self, [self.innerHTML, settings]);
368+
callback.apply(self, [result, settings]);
366369
if (!$.trim($(self).html())) {
367370
$(self).html(settings.placeholder);
368371
}

0 commit comments

Comments
 (0)