Difference between revisions of "Team:USTC-Software/js/init"

 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
$(document).ready(function () {
 
$(document).ready(function () {
         $('.container').height($(window).height()-$('#menu').height() - 30)       
+
         $('.container').height($(window).height()-$('#menu').height() - 12)       
         $('.wide').height($(window).height()-$('#menu').height() - 45)
+
         $('.wide').height($(window).height()-$('#menu').height() - 30)
         $('#leftnav').height($(window).height() - $('#menu').height() - 130)
+
         $('#leftnav').height($(window).height() - $('#menu').height() - 100)
 +
$('.ui.menu .ui.dropdown').dropdown({
 +
        on: 'hover'
 +
      });
 +
$('.ui.menu a.item')
 +
        .on('click', function() {
 +
          $(this)
 +
            .addClass('active')
 +
            .siblings()
 +
            .removeClass('active')
 +
          ;
 +
        })
 +
      ;
 
     })
 
     })

Latest revision as of 07:25, 15 October 2018

$(document).ready(function () {

       $('.container').height($(window).height()-$('#menu').height() - 12)       
       $('.wide').height($(window).height()-$('#menu').height() - 30)
       $('#leftnav').height($(window).height() - $('#menu').height() - 100)

$('.ui.menu .ui.dropdown').dropdown({

       on: 'hover'
     });

$('.ui.menu a.item')

       .on('click', function() {
         $(this)
           .addClass('active')
           .siblings()
           .removeClass('active')
         ;
       })
     ;
   })