This is a migrated thread and some comments may be shown as answers.

Touch demo does not work

1 Answer 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martijn
Top achievements
Rank 1
Martijn asked on 08 Feb 2013, 09:33 AM
I can't get the touch demo on the site to work. I copied the source, but I can't get it running. This is my code:

<!DOCTYPE html>
<html>
<head>
    <title>Voiss</title>
     
    <script src="Scripts/kendo/last/jquery.min.js"></script>
    <script src="Scripts/kendo/last/kendo.all.min.js"></script>
    <link href="Content/kendo/last/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="Content/kendo/last/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="Content/kendo/last/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
     
</head>
 
<body>
    <div data-role="view" data-title="Touch Events">
 
    <div
        id="touchSurface"
        data-role="touch"
        data-enable-swipe="1"
        data-touchstart="myTouch.touchstart"
        data-swipe="myTouch.swipe"
        data-tap="myTouch.tap"
        data-doubletap="myTouch.doubletap"
        data-hold="myTouch.hold"
        >
    Touch, swipe, double-tap, tap, and hold me
</div>
<div class="console"></div>
</div>
 
<script>
    window.myTouch = {
        touchstart: function(e) { kendoConsole.log("touch start"); },
        swipe: function(e) { kendoConsole.log("swipe " + e.direction); },
        tap: function(e) { kendoConsole.log("tap"); },
        doubletap: function(e) { kendoConsole.log("double tap"); },
        hold: function(e) { kendoConsole.log("hold"); }
    }
</script>
 
<style scoped>
    #touchSurface {
        background: black;
        color: white;
        padding: 20px;
        line-height: 20em;
        text-align: center;
        font-style: italic;
    }
</style>
 
 
<script>
    var app = new kendo.mobile.Application(document.body);
</script>
</body>
</html>

The js and css files are the latest, but it fails to run, both on my browsers (chrome, firefox, ie) as my tablet (android)

1 Answer, 1 is accepted

Sort by
0
Martijn
Top achievements
Rank 1
answered on 08 Feb 2013, 10:58 AM
Fout it, it was the kendoConsole, replaced it with console
Tags
General Discussions
Asked by
Martijn
Top achievements
Rank 1
Answers by
Martijn
Top achievements
Rank 1
Share this question
or