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

It can‘t work for <div> lists? only for <ul>? #41

Open
funwewhere opened this issue Oct 27, 2016 · 3 comments
Open

It can‘t work for <div> lists? only for <ul>? #41

funwewhere opened this issue Oct 27, 2016 · 3 comments

Comments

@funwewhere
Copy link

I change the demo and css for div, but don't work

@funwewhere
Copy link
Author

I change the source Code function add() following, then div stroll is work:

// Only allow ul/ol
if( !element.nodeName || /^(ul|ol)$/i.test( element.nodeName ) === false ) {
return false;
}
// Delete duplicates (but continue and re-bind this list to get the
// latest properties and list items)
else if( contains( element ) ) {
remove( element );
}

to:

// Only allow ul/ol
if( !element.nodeName || /^(ul|ol**|div**)$/i.test( element.nodeName ) === false ) {
return false;
}
// Delete duplicates (but continue and re-bind this list to get the
// latest properties and list items)
else if( contains( element ) ) {
remove( element );
}

but why only for ul/ol? have bug or other issue?

@vensires
Copy link

It doesn't seem like a bug. The "// Only allow ul/ol" comment above the line you altered makes sure that only ul and ol lists are only allowed intentionally.

@Belle-1
Copy link

Belle-1 commented Mar 8, 2018

@funwewhere , thank you for posting this issue, i did exactly the same as you did but the strolling is still not working. any help would be appreciated .
here is my issue

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

3 participants