or
<
div
data-role
=
"view"
data-layout
=
"mobile-tabstrip"
id
=
"tabstrip-contentr"
data-show
=
"initcontent"
>
<
div
class
=
"content"
>
<
div
id
=
"cntpagehtml"
></
div
>
<
div
data-role
=
"scrollview"
data-autobind
=
"false"
id
=
"my-scrollview"
data-template
=
"scrollview-binding-template"
data-enable-pager
=
"true"
>
</
div
>
<
script
id
=
"scrollview-binding-template"
type
=
"text/x-kendo-template"
>
<
div
style
=
"width:300px;"
>
<
div
>
<
img
src
=
"/webimages/gallery/#: Image #"
class
=
"slider"
/></
div
>
<
div
class
=
"title"
>#= Caption #</
div
>
</
div
>
</
script
>
</
div
>
</
div
>
function
GetGallery(sectionid) {
var
_GalleryDS =
new
kendo.data.DataSource({
transport: {
read: {
url:
"mobiledata.asmx/GetGallery"
,
dataType:
"json"
,
type:
"POST"
,
data: { SectionID: sectionid },
contentType:
"application/json; charset=utf-8"
},
parameterMap:
function
(data, operation) {
data = $.extend({}, data);
return
JSON.stringify(data);
}
},
serverPaging:
true
,
pageSize: 30,
schema: {
data:
"d[0].Items"
, total:
"d[0].TotalItems"
},
change:
function
() {
$(
"#my-scrollview"
).data(
'kendoMobileScrollView'
).refresh();
}
});
}
function
initcontent(e) {
var
scroller = e.view.scroller;
scroller.reset();
GetContent(
"#cntpagehtml"
, e.view.params.p);
var
Section = 0;
switch
(e.view.params.p)
{
case
"meet-the-team"
:
GetGallery(3);
//Assign the _GalleryDS to my scrollview......
break
;
case
"design-consultancy"
:
GetGallery(6);
//Assign the _GalleryDS to my scrollview......
break
;
case
"point-of-sale"
:
GetGallery(4);
//Assign the _GalleryDS to my scrollview......
break
;
default
:
}
};
$(
'#scrollview-container [data-role="page"]'
).on(
'mousedown'
,
function
(e) {
console.log(
'mousedown'
);
e.stopImmediatePropagation();
});
$(
'#scrollview-container [data-role="page"]'
).on(
'touchstart'
,
function
(e) {
console.log(
'touchstart'
);
e.stopImmediatePropagation();
});