Call another jquery plugin whenever a plugin is called

Call another jquery plugin whenever a plugin is called

I have 3 jquery plugins - fixheadertable, jqTransform and facebox. Whenever fixheadertable plugin is called other two plugins are not working.

So i have to call those two plugins after each call of fixheadertable.

This is happening because fixheadertable recreates the table rows whenever i sort or use pager. So the plugins used in those table rows are not working.

The important thing is jqTransform and facebox should be applied only inside the table where fixheadertable plugin is applied. Otherwise facebox displays the content twice on overlay.

working example :  http://jsfiddle.net/rQXtZ/6/

fixheadertable js:  https://raw.github.com/benjaminleouzon/tablefixedheader/master/javascript/jquery.fixheadertable.js

First click edit link. And then click on country to sort. Again try edit link. now facebox will not work. So i have to reapply that plugin only where fixheader table is applied.

I tried to use trigger at the end of the fixheadertable js file as 

  1. $(this).trigger('fixheadertable:done'); 

It didn't work.

Here is how i use the plugins 

  1. jQuery(document).ready(function($)
  2. {
  3.  $('.alter').fixheadertable({ 
  4.  height : ($(window).height()- 200), 
  5.  colratio : [30, ,50, 50], 
  6.  zebra : true, 
  7.  sortable : true,
  8.  resizeCol : true,
  9.  pager : false }); 

  10.  $('form').jqTransform({imgPath:'../../assets/includes/formplugin/img/'});
  11.  $('a[rel*=facebox]').facebox();
  12.  $('.alter').on('fixheadertable:done', function() {
  13.       $('.alter').jqTransform({imgPath:'../../assets/includes/formplugin/img/'});
  14.       $('.alter > a[rel*=facebox]').facebox();
  15.  });
  16.  
  17. });