Feb20
remove the ok button in jeditable select
Posted by: Brian Chan | Filed in: technology | Tags: programming | 02:53 pm, February 20th, 2012 Add comments
The default sample code for <select> in jeditable has an OK button. That ends up requiring one more click to pick a value from a dropdown.
1 2 3 4 5 | $('.editable').editable('http://www.example.com/save.php', {
data : " {'E':'Letter E','F':'Letter F','G':'Letter G', 'selected':'F'}",
type : 'select',
submit : 'OK'
}); |
To take away that OK button, just take out that “submit” attribute. Magically, after picking a value from the dropdown the value gets updated. Kudos to the contributor who enabled this feature.
1 2 3 4 | $('.editable').editable('http://www.example.com/save.php', {
data : " {'E':'Letter E','F':'Letter F','G':'Letter G', 'selected':'F'}",
type : 'select'
}); |
The hack mentioned in the following link is not applicable anymore, assuming you are using the latest version of jeditable.
Related posts:
- Jeditable – Edit In Place Plugin For jQuery
- Disallow de-select when select-all is checked
- The “select all” checkbox to select all checkboxes
- Select the last option of a drop down
- dataTables editable plugin multiple select