Skip to content

Support start slide on setup#61

Open
axelson wants to merge 2 commits intolyfeyaj:masterfrom
axelson:support-start-slide-on-setup
Open

Support start slide on setup#61
axelson wants to merge 2 commits intolyfeyaj:masterfrom
axelson:support-start-slide-on-setup

Conversation

@axelson
Copy link
Copy Markdown

@axelson axelson commented Mar 26, 2017

This allows you to add slides dynamically, even when moving backward.
To add a slide that occurs right before the current first slide write
code like the following:

var mySwipe = new Swipe(document.getElementById('slider'), {})
$('.swipe-wrap').prepend('

New Slide
');
mySwipe.setup({startSlide: 1});

This fork can be installed via bower with: bower install "swipe-js=https://github.com/axelson/swipe.git#2.2.4"

Fixes #28

If you'd like I could add some docs as well.

This allows you to add slides dynamically, even when moving backward.
To add a slide that occurs right before the current first slide write
code like the following:

var mySwipe = new Swipe(document.getElementById('slider'), {})
$('.swipe-wrap').prepend('<div>New Slide</div>');
mySwipe.setup({startSlide: 1});

This fork can be installed via bower with: bower install "swipe-js=https://github.com/axelson/swipe.git#2.2.4"
@axelson axelson mentioned this pull request Mar 26, 2017
@axelson
Copy link
Copy Markdown
Author

axelson commented Oct 14, 2017

Any thoughts on this? Would be nice to support reinitializing (better performance then a complete kill and new instance I think) for dynamic content.

@axelson
Copy link
Copy Markdown
Author

axelson commented May 27, 2018

Any chance on getting this merged? I can fix the conflicts if so.

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

Successfully merging this pull request may close these issues.

1 participant