code: function (current) {
        var currentStart = Math.round(current.position().top);
        var currentEnd = Math.round(current.position().top + current.height());
  
        var start = 0;
        var end = 0;
        var check = true;
        $('.jqs-period', $(current).parent()).each(function (index, period) {
          if (current.attr('id') !== $(period).attr('id')) {
            start = Math.round($(period).position().top);
            end = Math.round($(period).position().top + $(period).height());
  
            if (start > currentStart && start < currentEnd) {
              check = false;
            }
  
            if (end > currentStart && end < currentEnd) {
              check = false;
            }
  
            if (start < currentStart && end > currentEnd) {
              check = false;
            }
  
            if (start === currentStart || end === currentEnd) {
              check = false;
            }
          }
        });
  
        return check;
      }
docs: Check if a period is valid
  @param current
  @returns {boolean}