This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="../../js/jquery.min.js" /> | |
<script src="../../js/kendo.all.min.js" /> | |
<script> | |
$('document').ready(function(){ | |
var viewModel = kendo.observable({ | |
fname: "Sagar", | |
lname: "Ganatra", | |
fullname: function() { | |
return this.get("fname") + ' ' + this.get("lname"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="testView"> | |
Firstname: <input id="firstName" type="text" data-bind="value: fname"><br/> | |
Lastname: <input id="lastName" type="text" data-bind="value: lname"><br/> | |
Fullname: <input id="fullname" type="text" data-bind="value: fullname"><br/> | |
<input type="submit"> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script src="../../js/jquery.min.js"></script> | |
<script src="../../js/kendo.all.min.js"></script> | |
<script> | |
$('document').ready(function() { | |
viewModel = kendo.observable({ | |
optionsData: [ | |
{optionValue:1, optionName: "test1"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<div id="uploadFile"> | |
<input type="file" id="userfile"> | |
<div id="messages"> | |
</div> | |
</div> | |
<script> | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#box { | |
display: -webkit-flex; | |
display: -moz-flex; | |
display: flex; | |
-webkit-justify-content: center; | |
-moz-justify-content: center; | |
justify-content: center; | |
-webkit-align-items: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Define an Observer class | |
function Observer(name, updateFn) { | |
this.name = name; | |
this.updateFn = updateFn; | |
} | |
//Create an instance of Observer class | |
observerObj = new Observer("observer1", function(msg) { console.log(msg); }); | |
//Create an instance of the Subject and provide the observer object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a Car Model | |
var Car = Backbone.Model.extend({ | |
//Validate the Car Model | |
validate: function(attr) { | |
if( !(attr.brand && attr.model && attr.color) ) { | |
return "Error Occurred"; | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a Car Model | |
var Car = Backbone.Model.extend({ | |
//Validate the Car Model | |
validate: function(attr) { | |
if( !(attr.brand && attr.model && attr.color) ) { | |
return "Error Occurred"; | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>localStorage Test</title> | |
<script type="text/javascript" > | |
var count = 0; | |
var storageHandler = function () { | |
alert('storage event 1'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CarCollection = Backbone.Collection.extend({ | |
//Specify REST URL | |
url: 'http://localhost:8500/rest/Car/CarService', | |
initialize: function () { | |
this.bind("reset", function (model, options) { | |
console.log("Inside event"); | |
console.log(model); | |
OlderNewer