My javascript is having issues with the variable posy. This is all within a jquery onload function. Can anyone help me understand what is not right about this line?
var dhei = $('.share_event_btn').offset();
var posy = (dhei.top+22)-(self.pageYOffset);
EDIT:
var ehei = $('.share_event_btn').offset();
var dhei = parseInt(ehei);
Instead of:
Try:
Note:
pageYOffsetis not a reserved word so you can declare your own variable or function called pageYOffset but if you do then you will not be able to find or alter the scroll position of a window in some browsers