_layout_align_columns.html 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. <script>
  2. $(document).ready(function () {
  3. if ($(window).width() <= 720)
  4. return;
  5. var iTimeout = 500;
  6. var oLevelCells = function(iCellSmall, iCellLarge) {
  7. $('#bx-layout-cell-' + iCellSmall + ' .bx-db-container').css('height', $('#bx-layout-cell-' + iCellLarge + ' .bx-db-container').height());
  8. }
  9. if (1 == $('#bx-layout-cell-3 > div').length && 1 == $('#bx-layout-cell-2 > div').length) {
  10. var oCell2 = $('#bx-layout-cell-2 .bx-db-container');
  11. var oCell3 = $('#bx-layout-cell-3 .bx-db-container');
  12. if (oCell2.height() > oCell3.height()) {
  13. if(oCell2.find('form .bx-form-input-files-uploaders').length > 0)
  14. setTimeout(function() {
  15. oLevelCells(3, 2);
  16. }, iTimeout);
  17. else
  18. oLevelCells(3, 2);
  19. }
  20. else {
  21. if(oCell3.find('form .bx-form-input-files-uploaders').length > 0)
  22. setTimeout(function() {
  23. oLevelCells(2, 3);
  24. }, iTimeout);
  25. else
  26. oLevelCells(2, 3);
  27. }
  28. }
  29. });
  30. </script>