Search code examples
jquerycsshtmltogglepositioning

Set display block JQuery Toggle as default / CSS positioning


This is my first time asking on this great website (that I've been learning from for a long time now). I'd be very grateful if anyone could help me with this: Im working on this free html5 template called "Proximet".

On this website:

  1. I would like to know how could I make the toggles display block as default. I tried adding the style="display: block; " but somehow I get display:none; as default. I would like all toggles open as default.

  2. On the other hand, I would like to know how could I make the website to occupy the whole height of the browser window. I am on a 21 inch display, and the website doesnt seem to fulfill the whole height of the display. I would like the footer div placed on the very bottom of the website even if the content area is not filled with content.


Solution

  • The display will be set to "none" here:

    // Toggle box
    //##########################################
    $(document).ready(function(){
    $('.toggle-trigger').click(function() {
    $(this).next().toggle('slow');
    $(this).toggleClass("active");
    return false;
    }).next().hide();
    });  

    Remove .next().hide() from the code and the elements will stay visible