JavaScript model binding with a dynamic twist