Adjusting position of jQuery Facebox before triggering

1.5k views Asked by At

I wish to adjust the height of my dialog box.

I could do it this way, but there is an weird abrupt shift, esp if the pc is slow.

$.facebox($("#step1Facebox").html());
$("#facebox").css("top","175px");

Is there a way of doing it such the position is pre-adjusted before showing up?

1

There are 1 answers

1
Shane Garelja On BEST ANSWER

You could set a default CSS style for #facebox

#facebox {
    display:none;
}

Then fade in the box...

$.facebox($("#step1Facebox").html());
$("#facebox").css("top","175px").fadeIn();

Or, try this - but it depends whether facebox returns itself in the constructor:

$.facebox($("#step1Facebox").html()).hide();
$("#facebox").css("top","175px").fadeIn();