jQuery Load with jQuery Tabs - Unobtrusive Validat

2019-08-26 09:03发布

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条回答
神经病院院长
2楼-- · 2019-08-26 09:35

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/

查看更多
登录 后发表回答