4,554
edits
| No edit summary | No edit summary | ||
| Line 9: | Line 9: | ||
|      var listList1 = $('#list-list-1'); |      var listList1 = $('#list-list-1'); | ||
|      var listList2 = $('#list-list-2'); |      var listList2 = $('#list-list-2'); | ||
|      var listList3 = $('#list-list-3'); | |||
|      var filteredListItems = $('#list .filtered-list-item'); // Selecting filtered-list-items in #list |      var filteredListItems = $('#list .filtered-list-item'); // Selecting filtered-list-items in #list | ||
|      var originalListWidth = list.width(); // Store the original width for #list |      var originalListWidth = list.width(); // Store the original width for #list | ||
| Line 15: | Line 15: | ||
|      var originalListList1Width = listList1.width();   |      var originalListList1Width = listList1.width();   | ||
|      var originalListList2Width = listList2.width();   |      var originalListList2Width = listList2.width();   | ||
|      var originalListList3Width = listList3.width();   | |||
|      // Initial check to set the visibility based on the current state of filters |      // Initial check to set the visibility based on the current state of filters | ||
| Line 171: | Line 171: | ||
| 	    list.width(originalListWidth - wrapperWidth + adjustment).css('margin-right', (wrapperWidth) + 'px'); | 	    list.width(originalListWidth - wrapperWidth + adjustment).css('margin-right', (wrapperWidth) + 'px'); | ||
| 	    listList.width(originalListListWidth - wrapperWidth).css('margin-right', (wrapperWidth) + 'px'); | 	    listList.width(originalListListWidth - wrapperWidth).css('margin-right', (wrapperWidth) + 'px'); | ||
| 	    // Adjust width of filtered-list-items in #list | 	    // Adjust width of filtered-list-items in #list | ||
| Line 179: | Line 176: | ||
| 	    // Adjust width of #list-list-2 | 	    // Adjust width of #list-list-2 | ||
| 	    listList2.css('cssText', 'width:  | 	    listList1.css('cssText', 'width: 60% !important;'); | ||
| 	    listList2.css('cssText', 'width: 60% !important;'); | |||
| 	    listList3.css('cssText', 'width: 60% !important;'); | |||
| 	    // Hide communityFeatured | 	    // Hide communityFeatured | ||
| Line 425: | Line 424: | ||
| 	    list.width(originalListWidth).css('margin-right', '0'); | 	    list.width(originalListWidth).css('margin-right', '0'); | ||
| 	    listList.width(originalListListWidth).css('margin-right', '0'); | 	    listList.width(originalListListWidth).css('margin-right', '0'); | ||
| 	    // Revert width of filtered-list-items in #list | 	    // Revert width of filtered-list-items in #list | ||
| 	    filteredListItems.css('width', 'calc(20% - 0px)'); | 	    filteredListItems.css('width', 'calc(20% - 0px)'); | ||
| 	    // Revert width of filtered-list-items in #list | 	    // Revert width of filtered-list-items in #list | ||
| 	    listList1.width(originalListList1Width); // This resets the width of #list-list-2 | |||
| 	    listList2.width(originalListList2Width); // This resets the width of #list-list-2 | 	    listList2.width(originalListList2Width); // This resets the width of #list-list-2 | ||
| 	    listList3.width(originalListList3Width); // This resets the width of #list-list-2 | |||
| 	    // Check if filters are cleared before showing the featured content | 	    // Check if filters are cleared before showing the featured content | ||