JQuery Validate Uncaught TypeError: Cannot read property 'settings' of undefined

前端 未结 1 1296
陌清茗
陌清茗 2020-12-17 15:45

I am using JQuery Validate on a JQuery Mobile form that has a listview with an Auto Complete option that is created dynamically.

I get this error if you try and type

1条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-17 16:09

    Your whole problem is being cause by the dynamic HTML that is created by the listview() function. Inspecting the DOM reveals that this dynamically creates a new

    container. Since you've placed listview within your container, you now have
    nested within
    , which is very invalid HTML, and the whole reason the jQuery Validate plugin is working so unexpectedly.

    The solution is to place your listview element outside of your

    container.

    0 讨论(0)
提交回复
热议问题