jQuery Load with jQuery Tabs - Unobtrusive Validation

瘦欲@ 提交于 2019-12-11 19:35:48

问题


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


回答1:


I was able to do it using the Load Callback Function.

When the Load mehtod is completed I call the:

$.validator.unobtrusive.parse($(result))

http://api.jquery.com/load/



来源:https://stackoverflow.com/questions/21020518/jquery-load-with-jquery-tabs-unobtrusive-validation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!