Position jQuery Tools overlay next to trigger -


i want have multiple overlays multiple triggers same class opener jquery tools , apple effect. how can position overlays next triggers? have tried

$('button.opener').click(function() {       var positionx = $('#' + this.id).offset().left;       example("#item").overlay({  left: positionx, 

but works first time opened. really, appreciate help. here jsfiddle http://jsfiddle.net/fhkvw/ thanks.

you have set left position outside of initial config. reason, re-running of .overlay doesn't override config settings. 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 line     example('#item').overlay().getconf().left = positionx;     (example('#item').overlay().isopened() == true) ? example('#item').overlay().close() : example('#item').overlay().load(); }); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -