now, I use this function to cycle between my user controls, calling the init function of the second control only when it is completely visible on screen.
It works well, but in a particular case the init function is triggered before the hide animation started...
And I have no clue on what could cause this weird behavior...
I'm using jquery 1.8.3 and jquery ui 1.9.2
the structure is something like this
working case:
<div 1>
<user contro 1/>
</div1>
<div 2>
<user contro 2/>
</div2>
not working case:
<div 1>
<user contro 1/>
</div1>
<div 2>
<user contro 1/> //with different params that modify the visible structure of the dom