31 lines
946 B
JavaScript
31 lines
946 B
JavaScript
|
/*-------------------------------------------------------------------------------
|
||
|
PRE LOADER
|
||
|
-------------------------------------------------------------------------------*/
|
||
|
|
||
|
$(window).load(function(){
|
||
|
$('.loader-wrap').fadeOut(1000); // set duration in brackets
|
||
|
});
|
||
|
$("#gotop").click(function(){
|
||
|
jQuery("html,body").animate({
|
||
|
scrollTop:0
|
||
|
},1000);
|
||
|
});
|
||
|
$(window).scroll(function(){
|
||
|
if($(window).scrollTop()> 0){
|
||
|
$("#top").attr('class','on');
|
||
|
}
|
||
|
else{
|
||
|
$("#top").attr('class','top');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
//submenu
|
||
|
$(function(){
|
||
|
$('.dropdown-list').hover(function(){
|
||
|
if($(this).parent().hasClass('nav')) return false;
|
||
|
$(this).find('.submenu').stop(false,true).slideDown(200);
|
||
|
},function(){
|
||
|
if($(this).parent().hasClass('nav')) return false;
|
||
|
$(this).find('.submenu').stop(false,true).slideUp(200);
|
||
|
});
|
||
|
});
|