• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Redefine XenForo animation functions

CyberAP

Well-known member
#1
I was trying to change XenForo animation behaviour but got myself stuck at that high abstraction level. In xenforo.js we have jQuery.fn.extend function and within it also all our animating functions:
  • xfFadeDown
  • xfFadeUp
  • xfInsert
  • xfRemove
  • _xfSlideWrapper
  • xfSlideIn
  • xfSlideOut
And also two effects:
  • slideDownContentFade
  • slideDown
So how should I call them in case I want to overwrite their behaviour?
 

CyberAP

Well-known member
#2
Figured this out. I just have to overwrite functions using exactly the same code.
So it'll look like this:
Code:
!function($, window, document, _undefined)
{
    jQuery.fn.extend(
    {
        xfSlideOut: function(duration, easing, callback)
        {
            …
        }
    });
}(jQuery, this, document);