Search code examples
jqueryjquery-ui-tabs

beginner jQuery tabs - add easing effect


I'm using jQuery ui tabs with the following code but am having trouble adding easing or changing the speed of the effect:

$('#tabs-mcr > ul').tabs({ fx: { opacity: 'toggle' } });

standard opacity toggle but I'd like to either speed up the fade effect or add custom easing to it.


Solution

  • $('#tabs-mcr > ul').tabs({ fx: { opacity: 'toggle', duration: "fast" } });
    

    or if you want a certain amount of milliseconds:

    // half a second
    $('#tabs-mcr > ul').tabs({ fx: { opacity: 'toggle', duration: 500 } });