center projects slider

This commit is contained in:
Sanj 2011-11-11 23:21:14 +05:30
parent de076e530f
commit 2713f5a809
2 changed files with 19 additions and 3 deletions

View File

@ -5,6 +5,22 @@ $(function() {
return false;
});
$(window).resize(function() {
// var $gall = $('#galleryContainer, .simply-scroll-container');
var windowWidth = $(window).width();
var gallWidth = 860;
var leftWidth = 156;
// console.log(windowWidth);
if (windowWidth < 1025) {
return;
}
var newLeft = parseInt((windowWidth - gallWidth) / 2);
// console.log(newLeft);
$('#galleryContainer').animate({'marginLeft': newLeft + "px"});
$('.simply-scroll-container').animate({'marginLeft': newLeft + "px"});
});
setTimeout("$(window).resize()", 500);
$('.projectThumb').click(function() {
// alert("hi");

View File

@ -7,9 +7,9 @@
{% block extra_head %}
<link rel="stylesheet" href="/static/css/projects.css?1" type="text/css"/>
<link rel="stylesheet" href="/static/css/projectslider.css?1" type="text/css"/>
<link rel="stylesheet" href="/static/css/simplyscroll.css?1" type="text/css"/>
<link rel="stylesheet" href="/static/css/projects.css" type="text/css"/>
<link rel="stylesheet" href="/static/css/projectslider.css" type="text/css"/>
<link rel="stylesheet" href="/static/css/simplyscroll.css" type="text/css"/>
<script type="text/javascript" src="/static/js/slides.min.jquery.js"></script>