BACKBONE.JS change attribute model backbone.js - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

How to change the attribute of model using backbone.js ?


 134

BACKBONE.JS


0


<!DOCTYPE html>
<head>
<title> Model Example</title>
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js" type="text/javascript"></script>

<script type="text/javascript">

Lang = Backbone.Model.extend({
defaults: {
name: 'javascript',
},
initialize: function () {
this.bind("change:name", function (model) {
var name = model.get("name");
});
}
});
var lang = new Lang();
lang.set({ name: 'backbone.js' });
document.write(lang.get("name"));

</script>

</head>
<body>
</body>
</html> 


By        
The power of the user (%)
8%



The most helpful BACKBONE.JS solutions

How to get country from client ip address using backbonejs ?How to get country from client ip address using backbonejs ?BACKBONE.JS

Click to see more ...

  942     84

How to bind callback to only fire once before being removed using backbone.js ?How to bind callback to only fire once before being removed using backbone.js ?BACKBONE.JS

Click to see more ...

  665     66

How to detect the type of a device using backbonejs ?How to detect the type of a device using backbonejs ?BACKBONE.JS

Click to see more ...

  574     59

How to detect the version of IE browser using backbonejs ?How to detect the version of IE browser using backbonejs ?BACKBONE.JS

Click to see more ...

  402     53

How to detect mobile device not tablet using backbonejs ?How to detect mobile device not tablet using backbonejs ?BACKBONE.JS

Click to see more ...

  413     51

How to get clients latitude and longitude from ip address using backbonejs ?How to get clients latitude and longitude from ip address using backbonejs ?BACKBONE.JS

Click to see more ...

  450     48

How can I trigger a fucntion using backbone.js ?How can I trigger a fucntion using backbone.js ?BACKBONE.JS

Click to see more ...

  258     46

How can I trigger a function in backbone.sj?How can I trigger a function in backbone.sj?BACKBONE.JS

Click to see more ...

  543     44

How can I trigger multiple functions using backbone.js ?How can I trigger multiple functions using backbone.js ?BACKBONE.JS

Click to see more ...

  342     39

How set and get a value in backbone.js ?How set and get a value in backbone.js ?BACKBONE.JS

Click to see more ...

  236     36

Welcome aboard!
We are happy you are here and
wish you good net-raft!