How used prev and next navigation buttons?

633 views
Skip to first unread message

p4s...@gmail.com

unread,
Feb 5, 2013, 11:48:51 AM2/5/13
to sly...@googlegroups.com
Hi Darsain!
I love your plugin!
But i have a problem...
I have this code:

<div id="slider">
<div id="prev"></div>
<div id="next"></div>
<ul>
<li><img src="images/1.jpg"></li>
<li><img src="images/2.jpg"></li>
<li><img src="images/3.jpg"></li>
<li><img src="images/4.jpg"></li>
<li><img src="images/1.jpg"></li>
<li><img src="images/2.jpg"></li>
<li><img src="images/3.jpg"></li>
<li><img src="images/4.jpg"></li>
</ul>
</div>

and the plugin's activation:

$('#slider').sly({
horizontal: 1,
itemNav: "basic",
dragHandle: 1,
dynamicHandle: 1,
dragging: 1,
startAt: 3,
speed: 300,
pauseOnHover: 1,
prev: '#prev',
next: '#next'
});

But the buttons prev and next doesn't works and in your wiki i don't find anything that help me for this problem.
Thanks alot for your support!

Sly.js

unread,
Feb 6, 2013, 3:12:08 AM2/6/13
to sly...@googlegroups.com
As is it documented in the Markup section ( https://github.com/Darsain/sly/wiki/Markup ), the first element inside of the frame is the element Sly assumes is the element containing the content. In your case, it is the prev button.

You can theoretically place more items inside of the FRAME, if you place them after the SLIDEE and position them absolutely, but it is not a very good practice.

So please, read the documentation. It is all in there: https://github.com/Darsain/sly/wiki

p4s...@gmail.com

unread,
Feb 6, 2013, 3:15:46 AM2/6/13
to sly...@googlegroups.com
I have read the documentation but i don't understand where and how i can set the prev and next button...

Sly.js

unread,
Feb 6, 2013, 4:40:08 AM2/6/13
to sly...@googlegroups.com
Wherever except the FRAME. FRAME is for content, not controls.

p4s...@gmail.com

unread,
Feb 6, 2013, 4:59:50 AM2/6/13
to sly...@googlegroups.com
OK,
now it works, out or in the frame, with absolute position.
But happen a strange thing...i must push twice on the button for activated the slider

p4s...@gmail.com

unread,
Feb 6, 2013, 5:22:09 AM2/6/13
to sly...@googlegroups.com
and often not enough to press twice, it must be done more

p4s...@gmail.com

unread,
Feb 6, 2013, 5:47:11 AM2/6/13
to sly...@googlegroups.com
I resolved the problem!
I have put prevPage and nextPage in the options instead of prev and next and now works fine!
Which is the difference?
Thanks a lot!

gyouki hou

unread,
Feb 8, 2013, 5:59:55 AM2/8/13
to sly...@googlegroups.com
I know your problem

Because you initializing like cycleBy: 'pages', you cycled by pages, so you should use prevPage, nextPage.

p4s...@gmail.com

unread,
Feb 8, 2013, 9:50:40 AM2/8/13
to sly...@googlegroups.com
I have not set cycleBy in the options file, the plugin enable it automatically?
Reply all
Reply to author
Forward
0 new messages