JOAOSANTACRUZ.COM

Toggle div's height

Toggle div's height using jquery slide function, this can be used to menu animation or as content organiser.


						

<script type="text/javascript">
<!--

var bgImageON  = '/temas/default/img/setaMenuOpened.png';
var bgImageOFF = '/temas/default/img/setaMenuClosed.png';

function toogleSlide(elementID) {
    if ($(".submenu_" + elementID).css("display")=="block") {
        $(".submenu_" + elementID).slideUp();
        $("#bulletMenu_" + elementID).css({'backgroundImage' : 'url(' + bgImageOFF +')'});
    } else {
        $(".submenu_" + elementID).slideDown();
        $("#bulletMenu_" + elementID).css({'backgroundImage' : 'url(' + bgImageON +')'});
    }
}
</script>
 

Go Back