带有jQuery选项卡的jQuery加载-不显眼的验证 [英] jQuery Load with jQuery Tabs - Unobtrusive Validation
问题描述
我正在使用 jQuery Tabs ,并且正在使用 tabsbeforeactivate 事件加载标签页,以便仅在需要时通过 Ajax 加载内容. >.
我面临困难,因为我需要在注入各自的内容后手动启用Unobrusive Validation.完成后,我将使用 $('#tabs-0').load 和 $.validator.unobtrusive.parse($(result)); . >
我不知道为什么,但是我仍然没有得到不干扰用户的验证.
非常感谢
我能够使用 Load 回调函数来做到这一点.
加载方法完成后,我将呼叫:
$.validator.unobtrusive.parse($(result))
I am using jQuery Tabs and I am loading the tab pages using the tabsbeforeactivate event, so that I only load contents when needed through Ajax.
I am facing difficulties since I need to manually enable Unobrusive Validation after injecting the respective contents. I am using the $('#tabs-0').load and the $.validator.unobtrusive.parse($(result)); when completed.
I don't know why but I still don't get the Unobtrusive Validation.
Thanks a lot
I was able to do it using the Load Callback Function.
When the Load mehtod is completed I call the:
$.validator.unobtrusive.parse($(result))
这篇关于带有jQuery选项卡的jQuery加载-不显眼的验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!