Working example of jeditable and autocomplete working together

前端 未结 6 2257
无人共我
无人共我 2021-02-10 18:54

I see a lot of google posts on this but all seems to be talking about how this is in progress. Does anyone know of a working version of jeditable and autocomplete functionality

6条回答
  •  误落风尘
    2021-02-10 19:28

    Combining it with jQuery UI isn't much different to Mika's example above. This works for me

      $.editable.addInputType('autocomplete', {
          element : $.editable.types.text.element,
          plugin : function(settings, original) {
              $('input', this).autocomplete(settings.autocomplete);
          }
      });
    
      $(".autocomplete").editable("http://www.example.com/save.php", {
          type      : "autocomplete",
          tooltip   : "Click to edit...",
          onblur    : "submit",
          autocomplete : {
              minLength  : 2,
              source     : ["Aberdeen", "Ada", "Adamsville", "Addyston", "Adelphi", "Adena", "Adrian", "Akron"]
          }
      });
    

提交回复
热议问题