{% else-1 %}
RSST * 0.85
(21 апр 2013, 00:55) (0/0) [0]
что тут лишнее убрать

[code]
/* Объект Slider
-----------------------------------------------*/
var Slider = function(){

this.imgs = wrapper.find(\'div.image\');
this.imgCount = (this.imgs.length) - 1; // Индекс соответствия
this.navPrev = wrapper.find(\'a.prev\');
this.navNext = wrapper.find(\'a.next\');
this.bullets = container.find(\'.nav a\');
this.thumbs = container.find(\'.nav img.thumb\');
this.captions = this.imgs.find(\'p\');

this.getCurrentIndex = function(){ // Индекс
return this.imgs.filter(\'.current\').index();
};

this.go = function(index){ // Смена изображений
this.imgs
.removeClass(\'current\')
.fadeOut(opt.fadeSpeed)
.eq(index)
.fadeIn(opt.fadeSpeed)
.addClass(\'current\');
this.bullets
.removeClass(\'current\')
.eq(index)
.addClass(\'current\');
this.thumbs
.removeClass(\'current\')
.eq(index)
.addClass(\'current\');
};

this.next = function(){
var index = this.getCurrentIndex();
if (index < this.imgCount) {
this.go(index + 1); // К следующему
} else {
this.go(0); // Если последнее, то переходим к первому
}
};

this.prev = function(){
var index = this.getCurrentIndex();
if (index > 0) {
this.go(index - 1); // К предыдущему
} else {
this.go(this.imgCount); // Если первое, то переход к последнему
}
};

this.init = function(){ // Инициализация
wrapper
.width(opt.width)
.height(opt.height); /* Устанавливаем высоту и ширину */

this.imgs.hide().first().addClass(\'current\').show(); /* Устанавливаем текущее изображение */
this.bullets.first().addClass(\'current\');
this.thumbs.first().addClass(\'current\');

// Размеры для миниатюр и названий
var padding = wrapper.css(\'padding-left\').replace(\'px\', \'\');
var captionsPadding = this.captions.css(\'padding-left\').replace(\'px\', \'\');
nav.width(opt.width);
if (opt.thumbs === true) { // Миниатюры
var thumbBorder = this.thumbs.css(\'border-left-width\').replace(\'px\', \'\');
var thumbMargin = this.thumbs.css(\'margin-right\').replace(\'px\', \'\');
var thumbMaxWidth = opt.width/opt.row;
this.thumbs.width( (thumbMaxWidth - (thumbMargin * 2)) - (thumbBorder * 2) );
}
this.captions // Названия
.width(opt.width - (captionsPadding * 2) + \'px\')
.css(\'margin-bottom\', padding + \'px\');
this.navNext.css(\'margin-right\', padding + \'px\');

};

};

var slider = new Slider();
slider.init();
[/code]
RSST * 0.85
(21 апр 2013, 00:54) (0/0) [0]
этот код под текст как сменить за место img
[code]
(function($){

$.fn.powerSlide = function(options) {

var opt = {
\'width\': 908, // Ширина и высота изображения
\'height\': 340,
\'position\': \'bottom\', // Положение навигации
\'bullets\': false, // Показывать цифровую навигацию
\'thumbs\': true, // Показывать навигацию миниатюр
\'row\': 10, // Миниатюр на строку
\'auto\': true, // Автопроигрывание
\'autoSpeed\': 4000,
\'fadeSpeed\': 1000
};

this.each(function() {

if (options) {
$.extend(opt, options);
}

/* Контейнеры
-----------------------------------------------*/
$(this).children().wrapAll(\'<div class=\"powerSlide\" />\');
var container = $(this).find(\'.powerSlide\');
container.find(\'img\').wrapAll(\'<div class=\"wrapper\" />\');
var wrapper = container.find(\'.wrapper\');


/* Кнопки \"следующий\" и \"предыдущий\"
-----------------------------------------------*/
wrapper.append(\'<a href=\"#\" class=\"prev\"><<</a><a href=\"#\" class=\"next\">>></a>\');


/* Навигация и названия
-----------------------------------------------*/
switch (opt.position) { // Позиция навигации
case \'top\': container.prepend(\'<div class=\"nav\" />\'); break;
case \'bottom\': container.append(\'<div class=\"nav\" />\'); break;
}

var nav = container.find(\'.nav\');

wrapper.find(\'img\').each(function(i){

i += 1; // Нумерация начинается с 1

if (opt.bullets === true) { // Навигация метками
nav.append(\'<a href=\"#\">\'+ i +\'</a>\');
}

if (opt.thumbs === true) { // Навигация миниатюрами
nav.addClass(\'thumbs\').append(
\'<img class=\"thumb\" src=\"\'+
$(this).attr(\'src\') +\'\" alt=\"\"/>\');
}

// Название
var title = $(this).attr(\'title\');
$(this).wrapAll(\'<div class=\"image\" />\');
if (title !== undefined) {
$(this).attr(\'title\', \'\');
$(this).after(\'<p>\'+ title +\'</p>\');
}
});
[/code]
RSST * 0.85
(21 апр 2013, 00:48) (0/0) [0]
Миледи, то есть текст оформить
RSST * 0.85
(21 апр 2013, 00:46) (0/0) [0]
Миледи, а html, css доступно смогу добавить?
RSST * 0.85
(21 апр 2013, 00:43) (0/0) [0]
Тут есть кто разбирается ждава скрипте?
Нужен простой скриптик
вывод текста
и кнопки вперед назад
на каждой страницы выводился текст который я там напишу
также нужно нужна функция автопроигрывание также при наведения мышку останавливалась проигрывание
  • 1 из 1