div display if block jquery

html, jquery

Solution

So you want to distinguish between `display: block` and `display: none` ? If so, you can better use the `is()` function in combination with the `:visible` selector for this:

if ($('#toshow').is(':visible')) {

} else {

}

This works regardless of if you used `display: block`, or `display: inline`, or `display: inline-block`.

Problem

i am trying trying to find out if a div style display is block then do something here is an e.g this is just a guess i am tryng to do it in jquery ``` if("#toshow":"display" == "block"){ }else{ } ```

Original source