이봐, JQuery와에 대한 질문으로 나를 다시 그리고 gridlayout 것을 나는 스위치와 내가 삽입하고 코드와 PHP는 템플릿을 만들어이노드는 계층 구조에서 지정된 지점에 삽입 할 수 없습니다 3
입니다<div id="wrapper">
<div id="grid">
<div class="box"><img src="img/an_005_BUR_thebeat.jpg" width="310px" height="438px" />3 index</div>
<div class="box"><img src="img/an_014_GUE_homme_a.jpg" width="310px" height="404px" />4 Culture</div>
<div class="box"><img src="img/an_044_BVL_springmotiv.jpg" width="310px" height="310px" />5 Pharma</div>
<div class="box"><img src="img/an_039_AN_diskette.jpg" width="310px" height="465px" />6 Pharma IT</div>
<div class="box"><img width="310px" height="100px" />7 Culture</div>
<div class="box"><img width="310px" height="120px" />8 Cosmetics</div>
<div class="box"><img width="310px" height="400px" />9 IT</div>
<div class="box"><img width="310px" height="400px" />10 Culture</div>
<div class="box"><img width="310px" height="400px" />11 IT</div>
<div class="box"><img width="310px" height="400px" />12 Culture</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#grid').gridLayout('.box', {col_width: 340, min_cols: 2});
// options - (values above are the defaults)
// col_width: the width of each grid block
// min_cols: the minimum number of cols on the page (reducing browser width below this will not decrease number of columns). Set to your largest block (3 = block spans 3 columns)
// gridLayout.placeAtEnd() - for placing a block at bottom right of grid
var final_block = $('');
$('#grid').gridLayout.placeAtEnd(final_block);
// gridchange event fires when window resize forces a grid refresh
$('#grid').bind("gridchange", function(e){
console.log('gridchange event fired');
// reposition the final block
$('#grid').gridLayout.placeAtEnd(final_block);
});
// this forces a redraw of grid
$('body').gridLayout.refresh();
// returns heights of each column
console.log('gridLayout.info():', $('#grid').gridLayout.info());
});
</script>
jquery 스크립트와 플러그인이 헤더에로드됩니다. 내가 이걸 실행하려고 할 때. 방화범은 나에게 말한다 :
는코드 "노드 계층 구조에서 특정 지점에 삽입 할 수 없습니다": "3"
아무도이 문제를 해결하는 방법을 알고 계십니까? http://18735.webhosting7.1blu.de/neu/index.php?item=lifestyle
이 오류는 어느 라인에 표시됩니까? – peirix
전체 마크 업이 도움이됩니다. 오류는 사용자 (플러그인)가 잘못된 부모 (예 : 테이블에 td)에 노드를 삽입하려고한다는 것을 의미합니다. – redsquare
또는 jsbin.com에서 문제가있는 데모를 모의 처리 – redsquare