mirror of
https://github.com/KevinMidboe/rohnenedre.git
synced 2026-02-14 05:19:18 +00:00
Initial commit. State 04.2021.
This commit is contained in:
66
wp-content/themes/professional/assets/js/custom.js
Normal file
66
wp-content/themes/professional/assets/js/custom.js
Normal file
@@ -0,0 +1,66 @@
|
||||
jQuery(document).ready( function () {
|
||||
|
||||
//For Menu Bar
|
||||
jQuery('#site-navigation li').find('ul').hide();
|
||||
jQuery('#site-navigation li').hover(
|
||||
function(){
|
||||
|
||||
jQuery(this).find('> ul').slideDown('fast');
|
||||
},
|
||||
function(){
|
||||
jQuery(this).find('ul').hide();
|
||||
});
|
||||
|
||||
jQuery('.menu-toggle').toggle(function() {
|
||||
jQuery('#site-navigation ul.menu').slideDown();
|
||||
jQuery('#site-navigation div.menu').fadeIn();
|
||||
},
|
||||
function() {
|
||||
jQuery('#site-navigation ul.menu').hide();
|
||||
jQuery('#site-navigation div.menu').hide();
|
||||
});
|
||||
|
||||
//Hide showcase items for waypoint to work
|
||||
jQuery('.showcase').fadeOut('fast');
|
||||
jQuery('article.grid2').fadeOut();
|
||||
jQuery('#home-title').fadeOut();
|
||||
jQuery('.pagination').fadeOut();
|
||||
|
||||
//For Tooltips
|
||||
jQuery('#social-icons a').tooltipster();
|
||||
|
||||
});//end ready
|
||||
|
||||
//Waypoint Animation
|
||||
jQuery(function($) {
|
||||
|
||||
$('#showcase').waypoint(function() {
|
||||
$('.showcase').fadeIn(1500);
|
||||
},
|
||||
{
|
||||
offset: '95%',
|
||||
triggerOnce: true
|
||||
});
|
||||
$('article.grid2').waypoint(function() {
|
||||
$('article.grid2').fadeIn(1500);
|
||||
},
|
||||
{
|
||||
offset: '95%',
|
||||
triggerOnce: true
|
||||
});
|
||||
$('#home-title').waypoint(function() {
|
||||
$('#home-title').fadeIn(1500);
|
||||
},
|
||||
{
|
||||
offset: '95%',
|
||||
triggerOnce: true
|
||||
});
|
||||
$('.pagination').waypoint(function() {
|
||||
$('.pagination').fadeIn(1500);
|
||||
},
|
||||
{
|
||||
offset: '95%',
|
||||
triggerOnce: true
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user