Anzeigen/ausblenden von div onload

Also ich habe eine Klasse von div ' s, die ich will-oder ausgeblendet werden, abhängig von einer variable, die ich bekomme.

Habe ich diesen code:

**HTML**

<div class="div_estado" >

    testing that
</div>

<div class="div_estado" >

    testing this
</div>

**JS**

$(document).ready(function(){
var estado= 4; //instead of 4 i have "<?php echo $_GET['estado']; ?>" but let's supose its' value is 4
        if (parseInt(estado)==5) 
        {                       
            $('.div_estado').show; //not working
        }
        else {
            $('.div_estado').hide; //not working
        }
});

Aber es funktioniert nicht richtig, können Sie mir helfen, dieses Problem lösen?

DEMO

InformationsquelleAutor DaftDev | 2013-07-04
Schreibe einen Kommentar