Wednesday, December 19, 2012

JQuery - window offset right

Script that counts right offset of an element in a window. Taken from: stackoverflow.com answers

var $whatever = $('#whatever');
var offset_right  = ($(window).width() - ($whatever.offset().left + $whatever.outerWidth()))

No comments:

Post a Comment