Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I add left and right arrows? #37

Closed
FKonyali opened this issue Feb 13, 2019 · 10 comments
Closed

How do I add left and right arrows? #37

FKonyali opened this issue Feb 13, 2019 · 10 comments

Comments

@FKonyali
Copy link

FKonyali commented Feb 13, 2019

Hi,

I removed the "mousemove()" function to cancel the drag. I put the left and right arrows into the zuck.js. I've defined the setting called arrowControl.

(option("arrowControl") ? '<div class="story-left"><i class="icon-arrow-back"></i></div>' : "")
(option("arrowControl") ? '<div class="story-right"><i class="icon-arrow-forward"></i></div>' : "")

It's okay up here. I think click events will be done in the function named navigateItem. But I couldn't.

When the left arrow is clicked, the slider has to go back. In the same way, the slider should go forward when the right arrow is clicked. Can you help me? @ramon82

Thank you.

@jnole
Copy link

jnole commented Feb 14, 2019

Hi @FKonyali ,

I have the same issue, I think navigationItem event is expecting coordinates, for this reason doesn't work. Hope @ramon82 can help us.

Regards

@ramonszo
Copy link
Owner

Hey,

There's an internal function called "moveStoryItem" which may help you https://github.com/ramon82/zuck.js/blob/master/src/zuck.js#L350

@FKonyali
Copy link
Author

Hi,

With a few minor changes and additions, I had the look I wanted. I will share my actions as soon as possible. Thank you @ramon82

@trbsi
Copy link

trbsi commented Feb 22, 2019

@FKonyali
Any luck?

@FKonyali
Copy link
Author

FKonyali commented Feb 25, 2019

Hi guys,

I'm sorry for the late reply. Demo: Zuck.js Add the Previous and Next button

I added to line 586. Line 542 and 547 line comment I did.

What to do:

  • You need to add "arrowControl: true" to the plugin settings. The default value is true.
  • You can add the appearance of arrows from line 436 in the js section. Css are up to you.

@trbsi @jnole @ramon82

@trbsi
Copy link

trbsi commented Feb 25, 2019

@FKonyali that's awesome :D
Did you maybe manage to add arrows to this part: http://prntscr.com/mq2ty6

@ramon82 can you add it to git?

@MariyaPuzyr
Copy link

@FKonyali that's awesome :D
Did you maybe manage to add arrows to this part: http://prntscr.com/mq2ty6

@ramon82 can you add it to git?

Hello, did you add arrows to this part?

@FKonyali
Copy link
Author

Hello, did you add arrows to this part?

@MariyaPuzyr, yes I added arrow and draggable. I can share if you want

@MariyaPuzyr
Copy link

@FKonyali,

Oh, please. If you can. I'll be very grateful.

@netbee1136
Copy link

Hi guys,

I'm sorry for the late reply. Demo: Zuck.js Add the Previous and Next button

I added to line 586. Line 542 and 547 line comment I did.

What to do:

* You need to add "arrowControl: true" to the plugin settings. The default value is true.

* You can add the appearance of arrows from line 436 in the js section. Css are up to you.

@trbsi @jnole @ramon82

Wrong Guidance Dude

from the master file there is a zuck.js-master\zuck.js-master\dist\zuck.mini,js using in the demo and there is nothing mentioned lines in that js file, can you pls guide us properly how to add the arrows ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants