Knockout Style binding Top and Left not working

Viewed 4450

I can't for the life in me understand why this isn't working. This should be a softball for someone. Thanks!

http://jsfiddle.net/ZsA4f/2/

HTML

<div data-bind="foreach:Zones">
    <div class="container" data-bind="style:{ top: ZoneY, left: ZoneX }, text: ZoneTest"></div>
</div>​

CSS

.container { position: absolute; font-size: .75em; }

Javascript

var viewModel = {
    Zones: ko.observableArray([
        {
            ZoneX: 100,
            ZoneY: 100,
            ZoneTest: "hello world"
        },
        {
            ZoneX: 200,
            ZoneY: 200,
            ZoneTest: "rage!"
        }
])        
};

ko.applyBindings();
1 Answers
Related