Difference between revisions of "Template:SYSU-Software/statics/js/index.js"

Line 1: Line 1:
 
let fkpage;
 
let fkpage;
 +
 +
 
$(document).ready(function () {
 
$(document).ready(function () {
$('#content').addClass('CORADOverride');
+
 
 +
 
 
   fkpage = $('.myfkpage').FKPageTransitions({
 
   fkpage = $('.myfkpage').FKPageTransitions({
 
     mode: 35,
 
     mode: 35,
Line 7: Line 10:
 
   });
 
   });
 
   fkpage.goToNextSlide();
 
   fkpage.goToNextSlide();
 +
  initTopBar("Home");
 
   (function () {
 
   (function () {
 
     let pageHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
 
     let pageHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
 
     $('.myfkpage').css('height', pageHeight + 'px');
 
     $('.myfkpage').css('height', pageHeight + 'px');
 +
    console.log(pageHeight)
 
   })();
 
   })();
 
});
 
});
Line 23: Line 28:
 
   $('.ui.dropdown.link.item').not($(this)).dropdown('hide');
 
   $('.ui.dropdown.link.item').not($(this)).dropdown('hide');
 
   $(this).dropdown('show');
 
   $(this).dropdown('show');
 +
 
});
 
});
 +
$('.ui.dropdown.link.item').on('click', function() {
 +
  // 当标题栏的标题被点击时,默认当作点击dropdown第一篇文章
 +
  $b = $(this).get(0).children[1].children[0];
 +
  $b.click();
 +
})
 +
;
  
$('.ui.sticky')
+
$('#home').on('mouseenter', function() {
   .sticky()
+
   console.log('hei');
   ;
+
   $('.ui.dropdown.link.item').dropdown('hide');
 +
})

Revision as of 17:01, 10 October 2018

let fkpage;


$(document).ready(function () {


 fkpage = $('.myfkpage').FKPageTransitions({
   mode: 35,
   mouseWheel: false
 });
 fkpage.goToNextSlide();
 initTopBar("Home");
 (function () {
   let pageHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
   $('.myfkpage').css('height', pageHeight + 'px');
   console.log(pageHeight)
 })();

});

$('.myfkpage').children('li').each(function (index, ele) {

 $(this).addClass('test');

});

$('.dropdown').dropdown({

 action: 'select'

}); $('.ui.dropdown.link.item').on('mouseenter', function () {

 $('.ui.dropdown.link.item').not($(this)).dropdown('hide');
 $(this).dropdown('show');

}); $('.ui.dropdown.link.item').on('click', function() {

 // 当标题栏的标题被点击时,默认当作点击dropdown第一篇文章
 $b = $(this).get(0).children[1].children[0];
 $b.click();

})

$('#home').on('mouseenter', function() {

 console.log('hei');
 $('.ui.dropdown.link.item').dropdown('hide');

})