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

Slippry considers sub child HTML as slides #122

Open
berridgeab opened this issue Dec 5, 2016 · 0 comments
Open

Slippry considers sub child HTML as slides #122

berridgeab opened this issue Dec 5, 2016 · 0 comments

Comments

@berridgeab
Copy link

Take the following HTML to be used as a slider and slides, altering the default elements setting to 'div'.

<div id = 'slide'>
    <div>
        Slide Content 1
    </div>
    <div>
        Slide Content 2
    </div>
    <div>
        Slide Content 3 with child DIV 
        <div id = 'child'>I am a child!</div>
    </div>
    <div>
        Slide Content 4
    </div>
</div>

Slippry will try to turn div#child in to its own slide. The plugin will also stop working.

The fix is really simple, change line 660 from this

slip.vars.slides = $(slip.settings.elements, el);

to this, so the plugin only targets the immediate children

slip.vars.slides = el.children(slip.settings.elements);

Otherwise, great work on the plugin, its great!

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

No branches or pull requests

2 participants