Hello !
i'm currently running some test on kendo ui Class to get a clean code in one of my project but i'm getting some errors i don't know how to solve.
here is my simple sample of code :
and here are the error i'm getting when i run it on chrome
i really don't know how to get through that ..
my wish is to implement a class that does simple class's job like methods, attributes and so on. i want to combine that with data-clic properties and the data-attribute feature that kendo ui implements.
thank you for helping and sorry if i'm posting in the wrong place but i haven't seen any section about kendo ui class .. :)
i'm currently running some test on kendo ui Class to get a clean code in one of my project but i'm getting some errors i don't know how to solve.
here is my simple sample of code :
<!DOCTYPE html><html><head> <title>Test</title> <link href="styles/kendo.common.min.css" rel="stylesheet" /> <link href="styles/kendo.default.min.css" rel="stylesheet" /> <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" /> <link href="styles/index.css" rel="stylesheet" /></head><body onload="onBodyLoad()" style="height:100%; padding-bottom: 100%"> <div data-role="view" id="test"> <a href="#test" class="button" data-role="button" data-click="test.myAlert" data-att="attributeTest" data-icon="search">buttonTest</a> </div> <script src="lib/jquery.min.js"></script> <script src="lib/kendo.all.min.js"></script> <script src="init/cordovaInit.js"></script><script type="text/javascript"> var Test = kendo.Class.extend({ init: function() { } myAlert: function(e) { alert("test"); }});</script> <script> var app = new kendo.mobile.Application($(document.body), { skin: "flat" }); var test = new Test(); test.myAlert(); </script> </body> </html>Uncaught SyntaxError: Unexpected identifier index.html:24Uncaught ReferenceError: Test is not defined index.html:32Uncaught TypeError: Cannot read property 'myAlert' of undefinedmy wish is to implement a class that does simple class's job like methods, attributes and so on. i want to combine that with data-clic properties and the data-attribute feature that kendo ui implements.
thank you for helping and sorry if i'm posting in the wrong place but i haven't seen any section about kendo ui class .. :)