Created
June 9, 2014 16:28
-
-
Save dimapaloskin/db42f7c0f21cfb282a58 to your computer and use it in GitHub Desktop.
script.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('.slide.axis .pep.x').pep({ | |
axis: 'x', | |
constrainTo: [0, 0, 0, ($('.slider').width() - $(".text").width()) * -1] | |
}) | |
$( '.more' ).click(function(event) { | |
event.preventDefault() | |
$( '.hide' ).slideToggle('slow') | |
}); | |
$( '.button-menu' ).click(function() { | |
event.preventDefault(); | |
$( 'nav' ).slideToggle('slow').css('z-index','10'), | |
$('.button-menu a').css('border-bottom', '1px dotted #000'); | |
}); | |
$(window).load (function() { | |
function captionPos(){ | |
if ($(window).width() > 603) { | |
$('.name').css('margin-top', $('#team h2:first-child').height() + $('#bx-pager').height() + 50) | |
} else { | |
console.log($('.bx-wrapper img')); | |
$('.name').css('margin-top', $('#team h2:first-child').height() + $('#bx-pager').height() + $('.bx-wrapper img').height() - 600 ), | |
$('.bx-wrapper img').css('margin-top', $('#team h2:first-child').height() + $('#bx-pager').height() + 50) | |
} | |
} | |
$(window).resize(captionPos); | |
$('.bxslider').bxSlider({ | |
pagerCustom: '#bx-pager', | |
mode: 'fade', | |
speed: 500, | |
onSliderLoad: function () { | |
captionPos(); | |
} | |
}); | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment