Search code examples
jqueryslide

Tab slide out plugin programmatically slide in


I am using this plugin: TabSlideOut jquery Plugin to slide make a tab slide out.

However is there any way to trigger the tab panel to slide in through code?

There is a button in the tab panel and upon clicking that I do some ajax processing after which I want the panel to close automatically if successful.


Solution

  • It doesn't look like the plugin has a close method. You can simply simulate a click on the success call back of your ajax call. Where .handle is the handle element you passed in to your TabSlideOut plugin

    $.ajax({
      url: 'ajax/test.html',
      success: function(data) {
        $('.handle').click();
      }
    });