$.fx.speeds._default = 600; console.log(pos_div); $("#dialog").dialog({ autoOpen: false, show: 'blind', hide: 'explode', position: [pos_div] });