Comments (6)
Andres,
Thanks for using ChUI.
Also, you can find more details about how to pass options to $.UIEditList at: http://chocolatechip-ui.com/documentation#/chuijs Tap on the $.UIEditList in the menu on the left.
from chocolatechip-ui.
Thanks for your response! I tried a lot of times in different ways I and I missed. I modified the example to show a simple alert and it only works after I click on the done button (as they say in the documentation). I would like to know how can I trigger a callback immediately after I delete an item (not when I click on the done button) such as the previous version(3.6.3). I did this:
var editableListOptions = {
movable: false,
callback: function(item) {
alert("hello world");
}
};
$('#editList').UIEditList(editableListOptions);
And it only shows the alert when I click on the done button (and not when I delete an item)...
Thanks again for your help...
from chocolatechip-ui.
In that case, you could do something like this:
$('#editList').on('singletap', 'button.delete', function(e) {
alert($(this).closest('li').find('h3').text());
});
I assume you want to get something, such as an item ID. But this is the same principle.
Please note that this is not a callback. After initializing the Editable list, add this delegated event listener to execute when the delete buttons are tapped.
from chocolatechip-ui.
Thank you so much... I think the previous behavior was better and this solution is a bit weird... But it works very well!!! Thanks again!!!
from chocolatechip-ui.
well, technically this gives you the ability to provide the user a way of canceling a deletion or move. And because the widget allows deletion and moving, you handle the final state with the done button, that's how native OS handle this type of list.
from chocolatechip-ui.
Cool! That's true... You are right... For the other hand, I don't know if you help with official documentation (I watched your videos) but it has a few things out of date and also a few spelling errors... I think this is a powerful and helpful framework and it could be better if the documentation was updated as possible. I can let you know some parts where it would be great to fix, to help learning people like me.
from chocolatechip-ui.
Related Issues (20)
- Example navigation-backto: scroll always results entering detail page HOT 2
- Grid do not work on Safari (iPad) HOT 2
- Chocolatechipjs in its own repo HOT 2
- Back button not rendering correctly on WP8 HOT 3
- Phonegap iOS scrolling singletap hadling issues HOT 23
- data-goto not functioning in Firefox 34, 35 HOT 7
- Chocolatechip-ui app freezes after iOS unlock HOT 2
- Keyboard autofocus being triggered on input fields
- data-goto syntax in docs is wrong HOT 1
- Where do I find example for buttons? HOT 2
- Cannot read property 'classList' of null HOT 4
- chui 3.5.5 does not work on Android Jellybean (4.2) HOT 12
- chocolatechip-ui.json purpose? HOT 3
- $.UIDeletable cannot read property 'on' of undefined HOT 13
- $.UIGoToArticle() loses history between tabs HOT 12
- wp8 nokia lumia 520 "back button issue" HOT 5
- Low Memory Warnings HOT 6
- Error when using $.UIGoToArticle HOT 9
- Tabbar on Android - with scrolled content double click needed HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolatechip-ui.