locked
I want to make a div hidden and also as a ms-grid

    Question

  •  I have a div, inside them other divs. I want to make that upper div as ms-grid and then make it's display as "none". I have to hide that div at beginning and show it when a user clicks a button. How to I set those properties together on one div?
    Wednesday, April 10, 2013 9:51 PM

Answers

  • Put a class to the div and also a class called "hidden" (Lets say "maindiv")

    For example:

    <div class="maindiv hidden" ....></div>


    in CSS use the style :

    .maindiv{
    
    display : -ms-grid;
    
    ...... (other properties and styles)
    
    }
    
    .hidden
    {
    display: none;
    }

    In button click use this code :

    function button_click(args)
    {
     var maindiv = document.body.querySelector(".maindiv");
     WinJS.Utilities.removeClass(maindiv, "hidden");
    }

    Hope this helps.

    - Girija

    Wednesday, April 10, 2013 10:01 PM