4,554
edits
No edit summary |
No edit summary |
||
Line 148: | Line 148: | ||
showArticleWrapper.css('display', 'block'); | showArticleWrapper.css('display', 'block'); | ||
var wrapperWidth = showArticleWrapper.outerWidth(true); | var fullWidth = $(window).width(); // Gets the full width of the window | ||
var adjustment = | var wrapperWidth = showArticleWrapper.outerWidth(true); | ||
list.width(originalListWidth | |||
listList.width(originalListListWidth | // Calculate the adjustment | ||
var adjustment = fullWidth - originalListWidth - wrapperWidth; | |||
// Apply the new width and margin | |||
list.width(originalListWidth + adjustment).css('margin-right', wrapperWidth + 'px'); | |||
listList.width(originalListListWidth + adjustment).css('margin-right', wrapperWidth + 'px'); | |||
// Adjust width of filtered-list-items in #list | // Adjust width of filtered-list-items in #list | ||
filteredListItems.css('width', 'calc(33.3% - 2px)'); | filteredListItems.css('width', 'calc(33.3% - 2px)'); |