I'm using it right now ...
if($('.current').hasClass('odd') && !$('.current').hasClass('even')) {
var oddMarL = $('.current img').css('margin-left');
var oddMarL2 = $('.touch').css('margin-left');
var oddMarT = $('.touch').css('margin-top');
oddMarL.replace('px', '');
oddMarL2.replace('px', '');
oddMarT.replace('px', '');
Math.abs(oddMarL,oddMarL2,oddMarT);
oddMarL = oddMarL + oddMarL2;
$('#zoom').css('margin-left',oddMarL);
$('#zoom').css('margin-top',oddMarT);
}
Is something wrong with my code, or is it just not possible?
It works until I add two values ββtogether or when I use math.abs. The error console indicates that the margin on the left cannot be analyzed.
I have reasons for this, so please do not use the class! :) thanks.
source
share