2 ways to do it:
1) run code in callback of load() which assures the html exists when you run it
mydiv.load(href, function(){
// new html exists , run tabs code
});
or
2) include code in the remote page being loaded in a script tag inside body but after the html elements it interacts with