tabs("refresh") not working with custom tabs download

tabs("refresh") not working with custom tabs download

I have the tabs widget applied to a website and everything works well, except that I am using the full jquery-ui download quite unnecessarily.

Attempting to improve download speed for my website I made a custom download for the tabs widget only.

It works fine for the initial load of the tabs, but when fetching new data with Ajax and applying the refresh method it just does not work.

It throws no errors.

The code is very straight forward:

1 - on page load - which works fine with the specific jquery-ui tabs download
 $( "#tabs" ).tabs();
  1. 2 - on ajax request
  2.         $.ajax({
                url: "/filter_brands.php",
                type: "POST",
                dataType:"html",
                data: str,
                success: function(data){
                    $("#tabs").html(data); //Replace contents of <tbody> tag
                    var size = ( (data + '').length )
                    if(size <1000){
                        $("#filtermodel :input").prop("disabled", true);
                    }
                },
               complete: function(){
                $( "#tabs" ).tabs("refresh");
                $( "#tabs" ).tabs({ active: 0 });
                resize_scroll();
                $("#reset").prop("disabled",false);
                }
            });

So, there's something amiss with the tabs only download.

I appreciate any help.

Bernard