Question: When I use different layouts to support different screens , should I use dp or px .

Answer: 
You should use the [jquery `.toggle`](http://api.jquery.com/toggle/) or [jquery UI `.toggle`](http://api.jqueryui.com/toggle/) method which does just that.

But the error in your logic is the `$('.reply').css('display', 'none')`. This sets the `display` to `none`. It does not check if it is `none`...

If you had to use that code you should change it to

```
if ( $('.reply').css('display') === 'none') )

```
Use the jQueryUI version of `toggle()` since you seem to be using a jQuery UI effect

**.toggle( effect [, options ] [, duration ] [, complete ] )**

Reference: <http://api.jqueryui.com/toggle/>

```
$(".fold_reply").click(function() {
     $(".reply").toggle("fold",  500);
})

```