baig / jquerymobile-editablelistview

A jQuery Mobile Plugin with an intuitive UI to add new list items and remove existing ones.
http://wasifbaig.com/jquerymobile-editablelistview/
Other
36 stars 16 forks source link

AJAX call on add/edit #13

Open mariashahid opened 8 years ago

mariashahid commented 8 years ago

Can I add ajax calls to add and delete buttons? If yes, can you please provide an example?

Also, Will this plugin work in mobile only since it uses jquery mobile?

baig commented 8 years ago

Can I add ajax calls to add and delete buttons? If yes, can you please provide an example?

I don't think you can directly attach events to add or delete buttons. But you can listen to the listviewchange which is triggered when the editable-listview comes out of the edit mode and then make an Ajax call based on any change in the list contents. See the Events page for more information. If you can share the context of your particular use case, then may be I'll be in a better position to suggest a solution.

Also, Will this plugin work in mobile only since it uses jquery mobile?

jQuery mobile is just a requirement to run this plugin. The plugin does not care if it's being run on a mobile or not. If you design a Tablet or Desktop UI using jQuery mobile, then there's no reason that this plugin should not work.