Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

e editable select no button

$(function () {
  var selectedEleValue = null;
  $('#basic').editableSelect({
    onSelect: function (element) {
      selectedEleValue = element.val();
      console.log('The val is: ' + element.val() + ' The text is: ' + element.text());
    }
  });
  $('form[action="http://stackoverflow.com/questions/38437449/edit-jquery-editable-select/"]').on('submit', function(e) {
    if (selectedEleValue != null) {
      $('#basic').val(selectedEleValue);
    }
  })
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #editable #select #button
ADD COMMENT
Topic
Name
2+9 =