stroll.js icon indicating copy to clipboard operation
stroll.js copied to clipboard

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

Open funwewhere opened this issue 8 years ago • 3 comments

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

funwewhere avatar Oct 27 '16 07:10 funwewhere

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?

funwewhere avatar Oct 27 '16 08:10 funwewhere

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.

vensires avatar Nov 16 '16 12:11 vensires

@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

Belle-1 avatar Mar 08 '18 10:03 Belle-1