javascript - x-editable (jQuery UI build) throws Uncaught TypeError -


consider following code:

inside jquery document.ready:

$.fn.editable.defaults.mode = 'popup'; $("#username").editable({         send: 'never',        success: function(response, newvalue) {         usermodel.set('username', newvalue); //update backbone model        } }); 

html:

<div class="editable">      <a href="#" id="username" data-type="text" data-pk="1" data-url="/post" data-title="enter username">superuser</a> </div> 

this throws uncaught typeerror: this.tip(...).find not function @ jqueryui-editable.js:4727.

i assume because of incompatibilities jquery ui version. how can around it?

update: adding full example:

<!doctype html> <html lang="en"> <head>   <meta charset="utf-8">   <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>   <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">   <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>   <link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet"/>   <script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/jqueryui-editable/js/jqueryui-editable.min.js"></script>   <script>     $(function() {         $.fn.editable.defaults.mode = 'popup';         $("#username").editable({             send: 'never',            success: function(response, newvalue) {             usermodel.set('username', newvalue); //update backbone model         }         });       });   </script> </head> <body>     <div class="editable">         <a href="#" id="username" data-type="text" data-pk="1" data-url="/post" data-title="enter username">superuser</a>     </div> </body> </html> 

i think bug in source code specific jqueryui 1.11.4. doesn't jquery version of source code has been touched since 2013, don't think it'll fixed anytime soon. unfortunately functional inplace editing library i've found, determined make work.

a decent alternative use "plain" version of library doesn't use jqueryui @ all. appears me functionally equivalent. if want "popup" instead of "inline" mode, need grab , include poshytip


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -