portal.js 675 Bytes
Newer Older
1 2
$(document).ready(function(e) {
    var card = document.getElementById('portal_cards');
3 4 5 6 7 8 9 10 11
    if (Boolean(card) == true){
        var cards = card.children;
        if(cards.length == 1){
            card.appendChild(newdiv1);
            for (var i = 0; i <= cards.length; i++){
                cards[i].classList.remove("col-lg-4");
                cards[i+1].classList.add("col-lg-6");
            }
            
12
        }
13 14 15 16 17 18
        if(cards.length == 2){
            for (var i = 0; i <= cards.length; i++){
                cards[i].classList.remove("col-lg-4");
                cards[i].classList.add("col-lg-6");
            }
            
19 20 21 22 23 24 25 26 27 28 29 30
        }
    }

});