I need to show overlay/lightbox window on my page depend on action input position. Below is my JQuery code, can enybody help me?
$('input.proxy').click(function() {
$('div.proxy').fadeIn('600', function() {
var r = ('input.proxy').attr('offsetTop');
$('div.proxy').css('margin-top', r + 'px' );
});
});
Use
$(".rightpage").offset().topto get the offset position.