ojm37a
05-20-2015, 09:47 PM
I'm attempting to use flexmenu with knockout and something is not working. I have a knockout view that accepts a json array of items. In the view, there's a link that I'm trying to populate with the flexmenu dropdown like this:
<a href="#"
data-bind="attr: {'data-flexmenu': 'menu_' + id}">
Share this Post
</a>
<ul data-bind="attr: {id:'menu_'+ id }" class="flexdropdown">
<li data-bind="text: id"></li>
<li data-bind="text: post_url"></li>
<li data-bind="text: organization_name"></li>
</ul>
All seems to go well (the id's of the ul's are set to "menu_1", "menu_2", etc. and the href's have their data-flexmenu attributes set to "menu_1", "menu_2", etc.) until you hover over the anchor tag. The left and top are being set to values that place the menu off-screen. Seems like knockout is setting the position of the anchors after flexmenu reads them? OR?
Ideas how I can fix this?
TIA,
ojm
<a href="#"
data-bind="attr: {'data-flexmenu': 'menu_' + id}">
Share this Post
</a>
<ul data-bind="attr: {id:'menu_'+ id }" class="flexdropdown">
<li data-bind="text: id"></li>
<li data-bind="text: post_url"></li>
<li data-bind="text: organization_name"></li>
</ul>
All seems to go well (the id's of the ul's are set to "menu_1", "menu_2", etc. and the href's have their data-flexmenu attributes set to "menu_1", "menu_2", etc.) until you hover over the anchor tag. The left and top are being set to values that place the menu off-screen. Seems like knockout is setting the position of the anchors after flexmenu reads them? OR?
Ideas how I can fix this?
TIA,
ojm