Running XenForo.Register on ajax loaded elements?


Well-known member
I know I've solved this issue before... but its been so long since I did it, I completely forgot how...

I am registering a call in jQuery:
XenForo.register('.MultiMainer', 'XenForo.MultiMainer');

Using some different code, I inserted a div into my page using AJAX. That new code has a MultiMainer class included with it. However, that class is not getting registered for the callback, since its being called in through AJAX after initial page load.

How do I make it so that new AJAX inserted elements get applied to the existing registers?
Okay, I figured it out using the following code:

Last edited:
Top Bottom