Try knockoutjs
Move script to the end of the template
Switch to bootstrap