问题
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