Jquery JEditable On Blur Function not working

171 Views Asked by At

I am using a plugin called Jeditable and onblur function is not working. I have tried to see documentation but it seem doucmentation link is broken. Below is code which i am trying to run but its not working

$('.edit').editable('<%=basePath%>edit_ppt', {
                indicator : 'Saving...', 
                tooltip:'Click to edit...',

                 onblur: function(value) {
                    $(".add_style").hide();
                      return(value);
                } ,
submitdata : function(value, settings) {
              return { "myid":"text_1"};
           },
 callback:function(value, settings) {
                     console.log(value);
                     return(value);

                }

            });
1

There are 1 best solutions below

0
mkane On

Try this instead I think your syntax is incorrect..

$('.edit').editable('<%=basePath%>edit_ppt', {
                indicator : 'Saving...', 
                tooltip:'Click to edit...',
                onblur: 'submit',
                'onsubmit': function(value, settings) {
                        return { "myid":"text_1"};
                },
                'callback': function(sValue) {
                    console.log(value);
                    return(value);
                },
            });