Hi, what am I doing wrong?
My test zink here
Search for “test”, enter and click “Add new item”
Swipeout (click and callback) do not work on new items
I use this to prepend: $(’#newitems’).prepend(newItem);
Thanks
Henning
Hi, what am I doing wrong?
My test zink here
Search for “test”, enter and click “Add new item”
Swipeout (click and callback) do not work on new items
I use this to prepend: $(’#newitems’).prepend(newItem);
Thanks
Henning
hi,
you cant just add elements in DOM with @click and expect them to work.
f7 dosnt work that way.
i would recomend you, instead of using $(’#newitems’).prepend(newItem)
, render an array of items. and let f7 so it job.
you can use Template7
<div class="list-block">
<ul>
{{#each items}}
<li class="item-content">
<div class="item-inner">
<div class="item-title">{{title}}</div>
</div>
</li>
{{/each}}
</ul>
</div>
then just add the item to the array and f7 will do the rest.
Template7 - Mobile-first JavaScript Template Engine (idangero.us)
Thanks
So the documentation for swipeout is just for static html-pages?
It will not work if you don’t use Template7?