I'm having hard time trying to understand a weird behavior of the complete callback of hide/show function..
i Made a HideThenShow function that works that way:
$("#div1").hide("drop", {direction: "up"}, 500,
function ()
{
$("#div2").show(("drop", {direction: "down"}, 500, div2namespace.Init())
})
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
</div2>
Do u have any idea?
Thanks a lot!