Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://finom.github.io/js/matreshka.min.js"></script>
  
<meta charset=utf-8 />
<title>Matreshka Example</title>
  
</head>
<body>
  <select>
    <option>1</option>
    <option>2</option>
    <option>3</option>
  </select>
</body>
</html>
 
var mk = new Matreshka();
mk.bindElement( 'x', 'select', {
    on: 'change',
    getValue: function() {
        return this.value;
    },
    setValue: function( v ) {
        this.value = v;
    }
});
mk.x = 2;
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers