4,554
edits
| No edit summary | No edit summary | ||
| Line 7: | Line 7: | ||
|      var list = $('#list'); |      var list = $('#list'); | ||
|      var listList = $('#list-list'); |      var listList = $('#list-list'); | ||
|     var listList1 = $('#list-list-1'); | |||
|     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 | ||
|      var originalListListWidth = listList.width(); // Store the original width for #list-list |      var originalListListWidth = listList.width(); // Store the original width for #list-list | ||
|     var originalListList1Width = listList1.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 163: | Line 169: | ||
| 	    console.log('Wrapper width:', wrapperWidth); | 	    console.log('Wrapper width:', wrapperWidth); | ||
| 	    var adjustment = 25; // Adjust this value as needed to close the gap | 	    var adjustment = 25; // Adjust this value as needed to close the gap | ||
| 	    list.width(originalListWidth - wrapperWidth + adjustment).css('margin-right', (wrapperWidth  | 	    list.width(originalListWidth - wrapperWidth + adjustment).css('margin-right', (wrapperWidth) + 'px'); | ||
| 	    listList.width(originalListListWidth - wrapperWidth +  | 	    listList.width(originalListListWidth - wrapperWidth).css('margin-right', (wrapperWidth) + 'px'); | ||
|         listList1.width(originalListList1Width - wrapperWidth).css('margin-right', (wrapperWidth) + 'px'); | |||
|         listList2.width(originalListList2Width - wrapperWidth).css('margin-right', (wrapperWidth) + 'px'); | |||
|         listList3.width(originalListList3Width - wrapperWidth).css('margin-right', (wrapperWidth) + 'px'); | |||
| 	    // Adjust width of filtered-list-items in #list | 	    // Adjust width of filtered-list-items in #list | ||
| Line 413: | Line 422: | ||
| 	    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'); | ||
|         listList1.width(originalListList1Width).css('margin-right', '0'); | |||
|         listList2.width(originalListList2Width).css('margin-right', '0'); | |||
|         listList3.width(originalListList3Width).css('margin-right', '0'); | |||
| 	    // Revert width of filtered-list-items in #list | 	    // Revert width of filtered-list-items in #list | ||