File tree Expand file tree Collapse file tree 3 files changed +71
-5
lines changed
Expand file tree Collapse file tree 3 files changed +71
-5
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+ < html xmlns ="http://www.w3.org/1999/xhtml ">
3+
4+ < head >
5+ < meta content ="text/html; charset=utf-8 " http-equiv ="Content-Type " />
6+ < link href ="css/styles.css " rel ="stylesheet " type ="text/css " />
7+ < title > Mod Menu</ title >
8+ < script src ="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js " type ="text/javascript "> </ script >
9+ < script src ="../src/jquery.columnizer.js " type ="text/javascript " charset ="utf-8 "> </ script >
10+ < script type ="text/javascript ">
11+ $ ( window ) . load ( function ( ) {
12+ $ ( '.menu-content' ) . columnize ( { columns : 2 , lastNeverTallest : true } ) ;
13+ } )
14+ </ script >
15+ </ head >
16+
17+ < body >
18+
19+ < div class ="menu-page ">
20+ < div class ="menu-content ">
21+ < div class ="dontsplit " style ="background-color: #CCC; height: 233px; ">
22+ </ div >
23+ < div class ="dontsplit " style ="background-color: #EEE; height: 220px; ">
24+ </ div >
25+ < div class ="dontsplit " style ="background-color: #CCC; height: 266px; ">
26+ </ div >
27+ </ div >
28+ </ div >
29+
30+ </ body >
31+
32+ </ html >
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+ < html xmlns ="http://www.w3.org/1999/xhtml ">
3+
4+ < head >
5+ < meta content ="text/html; charset=utf-8 " http-equiv ="Content-Type " />
6+ < link href ="css/styles.css " rel ="stylesheet " type ="text/css " />
7+ < title > Mod Menu</ title >
8+ < script src ="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js " type ="text/javascript "> </ script >
9+ < script src ="../src/jquery.columnizer.js " type ="text/javascript " charset ="utf-8 "> </ script >
10+ < script type ="text/javascript ">
11+ $ ( window ) . load ( function ( ) {
12+ $ ( '.menu-content' ) . columnize ( { columns : 2 , lastNeverTallest : true } ) ;
13+ } )
14+ </ script >
15+ </ head >
16+
17+ < body >
18+
19+ < div class ="menu-page ">
20+ < div class ="menu-content ">
21+ < div class ="dontsplit " style ="background-color: #EEE; height: 220px; ">
22+ </ div >
23+ < div class ="dontsplit " style ="background-color: #CCC; height: 266px; ">
24+ </ div >
25+ </ div >
26+ </ div >
27+
28+ </ body >
29+
30+ </ html >
Original file line number Diff line number Diff line change 428428 // We loop as we try and workout a good height to use. We know it initially as an average
429429 // but if the last column is higher than the first ones (which can happen, depending on split
430430 // points) we need to raise 'adjustment'. We try this over a few iterations until we're 'solid'.
431- for ( var loopCount = 0 ; loopCount < maxLoops ; loopCount ++ ) {
431+ //
432+ // also, lets hard code the max loops to 20. that's /a lot/ of loops for columnizer,
433+ // and should keep run aways in check. if somehow someone has content combined with
434+ // options that would cause an infinite loop, then this'll definitely stop it.
435+ for ( var loopCount = 0 ; loopCount < maxLoops && maxLoops < 20 ; loopCount ++ ) {
432436 $inBox . empty ( ) ;
433437 var $destroyable ;
434438 try {
561565 // so allow columns to be taller
562566 // and retry
563567 adjustment += 30 ;
564- if ( adjustment < 100 ) {
568+ // if(adjustment < 100){
565569 targetHeight = targetHeight + 30 ;
566570 if ( loopCount == maxLoops - 1 ) maxLoops ++ ;
567- } else {
568- loopCount = maxLoops ;
569- }
571+ // }else{
572+ // loopCount = maxLoops;
573+ // }
570574 } else if ( max - min > 30 ) {
571575 // too much variation, try again
572576 targetHeight = avgH + 30 ;
You can’t perform that action at this time.
0 commit comments