sum not working
sum not working
Hi there.. Could someone tell me why this code give me as result of totViewNav 1935 instead of 54 (the sum)? I premise that I'm putting this on a wordpress theme.. thx in advance!
- jQuery( window ).load(function(){
-
- var halfWindowHeight = jQuery( window ).height()/2;
- var halfViewportHeight = jQuery('.flex-active-slide').height()/2;
- var viewportNavHeight = jQuery('.flex-control-nav').height();
- var paddingViewNav = jQuery('.flex-control-nav').css('padding-top').replace('px', '');
- var totViewNav = viewportNavHeight + paddingViewNav;
- var result = halfWindowHeight - halfViewportHeight - totViewNav;
-
- jQuery('.flex-viewport').css("margin-top", result + "px");
-
- });