You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
$(function(){
|
|
var isauto = $('.more').attr('isauto');
|
|
if(isauto==1){
|
|
$('.type1 ul').css('height','auto');
|
|
}else{
|
|
$('.type1 ul').css('height','50px');
|
|
}
|
|
|
|
$('.more').click(function(){
|
|
var height = $('.type1 ul').height();
|
|
if(height<=50){
|
|
$('.type1 ul').css('height','auto');
|
|
}else{
|
|
$('.type1 ul').css('height','50px');
|
|
}
|
|
});
|
|
|
|
var mark = true;
|
|
$(window).scroll(function () {
|
|
var scrollheight = parseInt($(document).scrollTop());
|
|
if (scrollheight>=80) {
|
|
if (mark) {
|
|
mark = false;
|
|
$('.f-header').show();
|
|
$('.f-header').css('position','fixed').css('top','-60px');
|
|
setTimeout(function(){
|
|
$('.f-header').css('top','0');
|
|
},100)
|
|
}
|
|
} else {
|
|
if(!mark) {
|
|
mark=true;
|
|
$('.f-header').hide();
|
|
$('.f-header').attr('style','');
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
});
|