Форум программистов, компьютерный форум, киберфорум
jQuery
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.83/6: Рейтинг темы: голосов - 6, средняя оценка - 4.83
2 / 2 / 3
Регистрация: 29.09.2014
Сообщений: 88
1

Плагин stellar.js

19.11.2014, 14:32. Показов 1121. Ответов 1
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Доброго времени суток. Суть такова: я использую для создания сайта плагин stellar.js (параллакс), и мне необходимо сделать что-бы один из слайдов съежал вправо а не вниз (как по умолчанию). Может быть кто-то сталкивался? И возможно ли вообще такое. Спасибо.
0
Лучшие ответы (1)
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
19.11.2014, 14:32
Ответы с готовыми решениями:

Плагин на ВП
WordPress. Привет подскажите есть плагин wp-recall есть счёт свой как сделать на пустой странице...

плагин
помогите пожалуйсто расшифровать плагин, может кто знает как это сделать? заранее благодорю! ...

Плагин
Добрый день,помогите найти пожалуйста плагин по автозаполнению ключевых слов статьи. Большое...

Плагин
Ребята помогите надо написать jquery плагин "опросник", который принимает на вход JSON с вопросами...

1
2 / 2 / 3
Регистрация: 29.09.2014
Сообщений: 88
20.11.2014, 16:34  [ТС] 2
Лучший ответ Сообщение было отмечено dasweird как решение

Решение

Вот код если что плагина.
Javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
jQuery(document).ready(function ($) {
 
 
    //initialise Stellar.js
    $(window).stellar();
 
    //Cache some variables
    var links = $('.navigation').find('li');
    slide = $('.slide');
    button = $('.button');
    mywindow = $(window);
    htmlbody = $('html,body');
 
 
    //Setup waypoints plugin
    slide.waypoint(function (event, direction) {
 
        //cache the variable of the data-slide attribute associated with each slide
        dataslide = $(this).attr('data-slide');
 
        //If the user scrolls up change the navigation link that has the same data-slide attribute as the slide to active and 
        //remove the active class from the previous navigation link 
        if (direction === 'down') {
            $('.navigation li[data-slide="' + dataslide + '"]').addClass('active').prev().removeClass('active');
        }
        // else If the user scrolls down change the navigation link that has the same data-slide attribute as the slide to active and 
        //remove the active class from the next navigation link 
        else {
            $('.navigation li[data-slide="' + dataslide + '"]').addClass('active').next().removeClass('active');
        }
 
    });
 
    //waypoints doesnt detect the first slide when user scrolls back up to the top so we add this little bit of code, that removes the class 
    //from navigation link slide 2 and adds it to navigation link slide 1. 
    mywindow.scroll(function () {
        if (mywindow.scrollTop() == 0) {
            $('.navigation li[data-slide="1"]').addClass('active');
            $('.navigation li[data-slide="2"]').removeClass('active');
        }
    });
 
    //Create a function that will be passed a slide number and then will scroll to that slide using jquerys animate. The Jquery
    //easing plugin is also used, so we passed in the easing method of 'easeInOutQuint' which is available throught the plugin.
    function goToByScroll(dataslide) {
        htmlbody.animate({
            scrollTop: $('.slide[data-slide="' + dataslide + '"]').offset().top
        }, 2000, 'easeInOutQuint');
    }
 
 
 
    //When the user clicks on the navigation links, get the data-slide attribute value of the link and pass that variable to the goToByScroll function
    links.click(function (e) {
        e.preventDefault();
        dataslide = $(this).attr('data-slide');
        goToByScroll(dataslide);
    });
 
    //When the user clicks on the button, get the get the data-slide attribute value of the button and pass that variable to the goToByScroll function
    button.click(function (e) {
        e.preventDefault();
        dataslide = $(this).attr('data-slide');
        goToByScroll(dataslide);
 
    });
 
 
});
Добавлено через 35 секунд
А вот как я пытаюсь вызвать нужную мне функцию.
Javascript
1
2
3
            $(window).stellar({
                horizontalScrolling: true,
            });
0
20.11.2014, 16:34
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
20.11.2014, 16:34
Помогаю со студенческими работами здесь

плагин на jq
Не могу найти нигде плагин для плавной смены текста. Написал сам, но как то косячно получилось....

Плагин
Здравствуйте! Прошу помощи. Мне нужно написать плагин, который выполняет следующее: 1) Если...

Плагин
Здравствуйте, как реализовать такую систему на Wordpress?

плагин
не знаю как сделать, что бы программа работала. подскажите в чем ошибка, почему плагин не...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru