knockout.js and jQueryUI to create an accordion menu
问题 Got a slight problem trying to have jquery UI and knockout js to cohoperate. Basically I want to create an accordion with items being added from knockout through a foreach (or template). The basic code is as follows: <div id="accordion"> <div data-bind="foreach: items"> <h3><a href="#" data-bind="text: text"></a></h3> <div><a class="linkField" href="#" data-bind="text: link"></a></div> </div> </div> Nothing impressive here... The problem is that if I do something like: $('#accordion')