Jaxel
Well-known member
How would I do this in XF2?
Code:
XenForo.register('.MultiAdder', 'XenForo.MultiAdder');
XenForo.MultiAdder = function($form)
{
$form.bind('AutoValidationComplete', function(e)
{
if (e.ajaxData.templateHtml)
{
var html = e.ajaxData.templateHtml.split('=====');
$(html[0]).xfInsert('appendTo', '#TabVideos', 'xfFadeIn');
$(html[1]).xfInsert('appendTo', '#TabChats', 'xfFadeIn');
$(html[2]).xfInsert('appendTo', '#TabNames', 'xfFadeIn');
$('#TabNames').data('tabs').destroy();
new XenForo.Tabs($('#TabNames'));
}
});
}