I'm trying to position a modal dialog on top of an existing div, using simplemodal plugin.
Here's my code; it's not working:
jQuery(function ($) {
$('.slider-caption .basic').click(function (e) {
var p = $("#slider1");
var position = p.position();
$('#basic-modal-content').modal({
position: "absolute",
left: position.left,
top: position.top
});
return false;
});
});
It's still drawing in the middle of the window. I've also tried to set autoPosition
option to false, but that just makes it draw below the existing content at the left.
I'm using version 1.4.1 of simplemodal.