You have to set the left
position outside of the initial config. For some reason, the re-running of .overlay
doesn't override the config settings. This should work:
var example = jQuery.noConflict();
$('button.opener').click(function () {
var positionx = $('#' + this.id).offset().left;
example("#item").overlay({
left: positionx,
top: 100,
closeOnClick: false,
load: false,
effect: 'apple',
speed: 1000,
oneInstance: false,
fixed: false,
});
//add this line
example('#item').overlay().getConf().left = positionx;
(example('#item').overlay().isOpened() == true) ? example('#item').overlay().close() : example('#item').overlay().load();
});