Tertium non datur.
Страница: 1
Сообщений 1 страница 1 из 1
Страница: 1
$(document).ready(function(){
var currentPosition = 0;
var slideWidth = 330;
var slides = $('.slide');
var numberOfSlides = slides.length;
// Remove scrollbar in JS
$('#slidesContainer').css('overflow', 'hidden');
// Wrap all .slides with #slideInner div
slides
.wrapAll('')
// Float left to display horizontally, readjust .slides width
.css({
'float' : 'right',
'width' : slideWidth
});
// Set #slideInner width equal to total width of all slides
$('#slideInner').css('width', slideWidth * numberOfSlides);
// Insert controls in the DOM
$('#slideshow')
.prepend('Clicking moves left')
.append('Clicking moves right');
// Hide left arrow control on first load
manageControls(currentPosition);
// Create event listeners for .controls clicks
$('.control')
.bind('click', function(){
// Determine new position
currentPosition = ($(this).attr('id')=='rightControl') ? currentPosition+1 : currentPosition-1;
// Hide / show controls
manageControls(currentPosition);
// Move slideInner using margin-left
$('#slideInner').animate({
'marginLeft' : slideWidth*(-currentPosition)
});
});
// manageControls: Hides and Shows controls depending on currentPosition
function manageControls(position){
// Hide left arrow if position is first slide
if(position==0){ $('#leftControl').hide() } else{ $('#leftControl').show() }
// Hide right arrow if position is last slide
if(position==numberOfSlides-1){ $('#rightControl').hide() } else{ $('#rightControl').show() }
}
});
the vampire diaries - new history |
![]() ![]() |
24 декабря 20.00-05.00 Падает снежок, легкий мороз. Температура воздуха -10°C ![]() • Добро пожаловать на ролевую игру The Vampire Diaries | Soul Love. • Уважаемые гости, не сидим на главной странице, а быстренько идем и регистрируемся. • Рейтинг игры NC-21, а это значит, за вашу психику мы ответственности не несем.) • Идет активный набор игроков и PR-менеджеров! • Игра начинается. Квест написан. Отыгрываем. • ОЧЕНЬ НУЖНЫ: Мэтт Донован, Анна Харрис, Лука, Джулс.
|
Привет, Гость! Войдите или зарегистрируйтесь.
Вы здесь » the vampire diaries - new history » Партнерство. » Tertium non datur.
Вы здесь » the vampire diaries - new history » Партнерство. » Tertium non datur.