开发者

Using clearbox with a codeigniter site

I'm trying to use clearbox with a codeigniter site. I'm not able to get it to work and I have a feeling it has to do with this line which is located in clearbox.js. I'm not sure if it has to be relative to my view file or what.

var CB_ScriptDir='clearbox'; // RELATIVE to your html file!

Anyone ever used th开发者_JS百科is plugin before?


It has to be relative to your index.html page. When you download the clearbox zip file from the developers page, you get a containing folder called "clearbox" which has both clearbox.js and the actual folder clearbox inside it. If you have your zip containing folder at the level of your index.html page, you would set parameters as follows:

var CB_ScriptDir='clearbox/clearbox'; // RELATIVE to your html file!

If you take both clearbox.js and the folder clearbox out of the containing clearbox folder, your setting would be:

var CB_ScriptDir='clearbox'; // RELATIVE to your html file!

The confusion is with the zip extracting clearbox inside a folder named clearbox!


I think that if your website stracture is like

  • index.html
  • js (directory)
    • clearbox.js
      • clearbox (directory)

Than you should set CB_ScriptDir like this:

var CB_ScriptDir='js/clearbox';


Make a /js dir in the top directory where your index.php resides. Put clearbox.js and folder /clearbox.

var CB_ScriptDir='../../../js/clearbox'; 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜