if/else question

if/else question

Hello,

I have this simple question:

- I want to make an if statement that looks for the value of a style

Obviously I'm doing it in the wrong way:


function myFunction ( ) {
        if($('.item').css('top','0') ){       //I mean: if .item has a top position of 0, do this.
            alert('Item has a top position of 0');
        }else{
            alert('Item has NOT a top position of 0');
        }
}





http://jsbin.com/ikewe4/edit

Please, can I get the answer of those 2 questions?
-What is the correct syntax I must use for my example?
-What would be the correct syntax if I'd want to check more than one style instead of just the top position?

Thanks!