Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($){
- $(function() //Document ready event
- {
- //Sidebar navigation
- $('.nav-toggle').click(function(){
- $('.main-sidebar').toggleClass('toggle-on');
- $('.section-wrapper').toggleClass('toggle-on');
- });
- //Height forced 100%
- function setDimensions(){
- var windowsHeight = $(window).height();
- $('.background,.section-wrapper ').css('height', windowsHeight + 'px');
- }
- //when resizing the site, we adjust the heights of the sections
- $(window).resize(function() {
- setDimensions();
- });
- setDimensions();
- function initPageBackground() {
- $("body").backstretch([
- "http://simonepasqualini.it/wp-content/uploads/bk-4.jpg",
- "http://simonepasqualini.it/wp-content/uploads/bk-3.jpg",
- "http://simonepasqualini.it/wp-content/uploads/bk-2.jpg",
- ], {duration: 3000, fade: 1200});
- $('#next').click(function(x) {
- x.preventDefault();
- $('body').data('backstretch').next();
- });
- $('#prev').click(function(x) {
- x.preventDefault();
- $('body').data('backstretch').prev();
- });
- }
- initPageBackground();
- });
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement