javascript - Using Select2 with Jeditable -


i new jquery plugins know basic jquery.

i trying combine select2 plugin jeditable in html table. have done want. problem dropdown shows , closed. have made jsfiddle of have done

https://jsfiddle.net/ongforog

html code:

<table> <tr> <th>location</th> </tr> <tr>   <td class="sites_select">location 1</td> </tr> </table> 

jquery code:

  $(".sites_select").editable("localhost/timesheet/sites/update", {   data   : "{'lorem ipsum':'lorem ipsum','ipsum dolor':'ipsum dolor','dolor sit':'dolor sit'}",     type: "select",         onblur: 'ignore'     }).on('click', function () {         $(this).find('select').select2({});     });      $(document).on('change', '.sites_select select', function () {         $(this).trigger("submit");     }); 

only problem having when click shows , hide immediately. appreciated.

$(".sites_select").editable("localhost/timesheet/sites/update", {     data   : "{'lorem ipsum':'lorem ipsum','ipsum dolor':'ipsum dolor','dolor sit':'dolor sit'}",     type: "select",     onblur: 'ignore' }).on('click', function () {     if($(this).find('.select2').length <= 0){         $(this).find('select').select2({});     } });  $(document).on('change', '.sites_select select', function () {     $(this).trigger("submit"); }) 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -