.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() } } });

Threads of the Fate

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Threads of the Fate » Важно


Важно

Тем 31 страница 36 из 36

Тема Ответов Просмотров Последнее сообщение
0 12 2022-08-28 19:04:27  XMC.PL-Master
0 16 2022-08-20 18:47:59  XMC.PL-Master
33 Закрыта Правила  Vampire Knight
0 158 2012-05-20 16:43:03  Vampire Knight
34 Закрыта Список персонажей  Vampire Knight
0 334 2012-05-20 16:41:51  Vampire Knight
35 Закрыта Сюжет  Vampire Knight
0 348 2012-05-20 14:31:08  Vampire Knight
36 Закрыта Занятые внешности  Vampire Knight
0 95 2012-05-20 14:30:41  Vampire Knight

Вы здесь » Threads of the Fate » Важно


Рейтинг форумов | Создать форум бесплатно