This is my code. It works on first click but not on second.. More precisely, IF works, ELSE doesn't work.
$(document).ready(function(){
    $( ".one" ).click(function() {     
        if($('.two').css('margin-right','-345px'))
            $('.two').css('margin-right', '0');
        else
            $('.two').css('margin-right', '-345px');       
    });
});
What am I doing wrong?
 
     
     
    