stroll.js
stroll.js copied to clipboard
It can‘t work for <div> lists? only for <ul>?
I change the demo and css for div, but don't work
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?
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.
@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