It means if your sticky element has id="dummy", wrapper will have id="dummy-sticky-wrapper".
If your sticky element does not have an ID - wrapper will have id="undefined-sticky-wrapper".
There is a problem when we have a few sticky elements on page without id (sidebar and header etc.)
it's not good to have two wrappers with that same id "undefined-sticky-wrapper"
How about to change this line with:
var wrapperIdSuffix = stickyId ? stickyId : new Date().valueOf();
var wrapperId = defaults.wrapperClassName + '-' + wrapperIdSuffix;
In this case wrapper id with will be more readable and it will be always unique on page (because timestamp is unique).
There is closed an issue related to bad ID of sticky wrapper element:
id="undefined-sticky-wrapper"
Current line from master branch defines wrapper ID:
It means if your sticky element has
id="dummy"
, wrapper will haveid="dummy-sticky-wrapper"
. If your sticky element does not have an ID - wrapper will haveid="undefined-sticky-wrapper"
.There is a problem when we have a few sticky elements on page without id (sidebar and header etc.) it's not good to have two wrappers with that same id "undefined-sticky-wrapper"
How about to change this line with:
In this case wrapper id with will be more readable and it will be always unique on page (because timestamp is unique).