Hello,
If I write:
and:
At the second time that I run the pull to refresh the "Pull to refresh" label is duplicate (see attached image)
If I write:
<
div
data-role
=
"view"
id
=
"offers"
data-layout
=
"general-home"
data-title
=
"Offers"
data-show
=
"filterOffers"
>
<
ul
id
=
"pull-to-refresh-offers"
></
ul
>
</
div
>
<
script
id
=
"productsTemplate"
type
=
"text/x-kendo-template"
>
<
div
class
=
"content_offers"
>
<
span
class
=
"title"
>#= NAME #</
span
>
</
div
>
</
script
>
and:
function
filterOffers(e) {
var
scroller = e.view.scroller;
scroller.reset();
categoryID = parseInt(e.view.params.CategoryID);
//console.log(categoryID);
var
getOffers =
new
kendo.data.DataSource({
transport: {
read: {
url:
"http://www.myurl.com"
,
dataType:
"jsonp"
,
beforeSend:
function
(req) {
$(
"#pull-to-refresh-offers"
).hide();
app.showLoading();
},
data: {
action:
"getOffers"
,
CategoryID: categoryID
}
}
},
change:
function
() {
app.showLoading();
setTimeout(
function
() {
app.hideLoading();
$(
"#pull-to-refresh-offers"
).show();
}, 200);
},
schema: {
data:
"res"
}
});
$(
"#pull-to-refresh-offers"
).kendoMobileListView({
dataSource: getOffers,
pullToRefresh:
true
,
template: $(
"#productsTemplate"
).text()
});
}
At the second time that I run the pull to refresh the "Pull to refresh" label is duplicate (see attached image)