Results 1 to 3 of 3

Thread: Using flexmenu with Knockout js

  1. #1
    Join Date
    May 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Using flexmenu with Knockout js

    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:

    HTML Code:
    <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

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.


    Please post a link to the page on your site that contains the problematic script so we can check it out.


    In order to facilitate helpful responses, you need to provide more information.

    If flexmenu is a DD script, you should provide the full name and a link to the demo page here on DD. See this thread for the proper posting format: http://www.dynamicdrive.com/forums/showthread.php?t=6

    You should also provide a link to knockout and a link to part(s) of the documentation that are pertinent to your question. A knockout user may be able to help you (although I can't say I've personally heard any of the regular coders here mention it), or the syntax may be familiar enough that a non-knockout user can make useful suggestions too.

    We also need a link to your page to give us something to troubleshoot from. We need to see the exact setup you describe but additionally, there may be other scripts causing conflicts or other factors that have been overlooked.

    Once you have provided all the above information, someone with appropriate knowledge may be able to help.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    May 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ahh, yes. Sorry. Turns out Knockout and flexmenu are working just fine. When I distilled the code down to a simpler example, everything works. There's some conflict in the very large code-base that I haven't found yet... Can't really post that much code (mixture of c#, vb, js, jquery, black cats, eye of newt...).

    Thanks anyway. I'll post better questions in the future, if needed.

    --ojm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •