节点不能插入层次结构“code:”3中的指定点

嘿,这是我关于jquery和gridlayout的问题,我用开关制作了一个php模板,我插入的代码就是这个

3 index
4 Culture
5 Pharma
6 Pharma IT
7 Culture
8 Cosmetics
9 IT
10 Culture
11 IT
12 Culture
$(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() ); });

jquery脚本和插件加载到标头中。 当我试图运行这个。 萤火虫告诉我:

“无法在层次结构中的指定点插入节点”代码:“3”

有谁知道如何解决这个问题?

这是我加载的一个例子: http : //18735.webhosting7.1blu.de/neu/index.php?item = lifestyle

我很确定您的错误与以下内容有关。 什么是$(”)!

 var final_block = $(''); $('#grid').gridLayout.placeAtEnd( final_block ); 

如果我说,它的工作原理

 var final_block = $('
'); $('#grid').gridLayout.placeAtEnd( final_block );

如果在$()构造函数中有不正确的html,以及当您尝试将节点附加到自身时,则会显示错误消息(在firebug中),例如:

 $div = $('
'); $div.append($div);