Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
made sticky wrapper Id unique on page
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalets committed Jan 8, 2019
1 parent 73b0fbe commit a394e68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jquery.sticky.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
var stickyElement = $(this);

var stickyId = stickyElement.attr('id');
var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName;
var wrapperSuffix = stickyId ? stickyId : new Date().valueOf();
var wrapperId = defaults.wrapperClassName + '-' + wrapperSuffix;
var wrapper = $('<div></div>')
.attr('id', wrapperId)
.addClass(o.wrapperClassName);
Expand Down

0 comments on commit a394e68

Please sign in to comment.