【问题标题】:php jquery include not working very wellphp jquery include 不能很好地工作
【发布时间】:2013-07-28 10:00:40
【问题描述】:

我正忙于一个让我发疯的问题。我制作了一个左浮动文件树视图,并包含了我的网站。但是当我将我的网站包含在我的文件树视图中时,我的树视图也不能点击[在 chrome 上],在 IE 9 中,我用于查看 pdf 文档的缩略图部分没有打开。 Chrome 比我的其他问题更重要。

让我给我代码 item id 是我的左侧菜单。

<div id="item" style="float:left">
<?php include("leftmenu.php"); ?>
</div>

示例包含方法。

sidebarOpenfile 也是文件树视图显示按钮。

<script type="text/javascript">
$(document).ready(function(){
$('#sidebarOpenfile').click(function()  
{

if ($('#item').css("height")=='0px')
{

    $('#item').animate({height:"700px"});
} 
else 
{

    $('#item').animate({height:"0px"});
}
 }); 
 }); 

以上 2 个代码在我的主页(.php 文件)中。

还有我的主页 php 文件的 css(#item 部分):

#item {
position:relative;
margin-left:0px;
float:left;
 top: 10px;
width: 200px;
height:0px;
bottom: 0px;
  background-color: hsla(0,0%,0%,.1);
  overflow:auto;
  display:inline-block;
}

最后我的leftmenu.php文件代码

$(document).ready( function() {
    $('#leftmenu').fileTree({ root: '../', script:    'fileview/connectors/jqueryFileTree.php', folderEvent: 'click', expandSpeed: 750, collapseSpeed: 750, multiFolder: false }, function(file) { 
                alert(file);
            });
});

仅此而已。并且包含的​​所有文件都是有效的并且可以正常工作。我的问题是

感谢您的帮助..

【问题讨论】:

  • 可能和z-index有关。看一看。否则,请提供更多信息,例如您的 #item 所在的 HTML / CSS。

标签: php jquery css


【解决方案1】:

严重错误:)

我不敢相信我怎么会错过。

你说得对。

我只需要更改 z-index 属性。

如果有人遇到类似问题,他们可以通过将 z-index 属性添加到他们的 css 文件来解决。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-22
    • 1970-01-01
    • 2020-08-09
    • 2011-12-02
    • 1970-01-01
    • 1970-01-01
    • 2016-12-08
    • 2020-11-24
    相关资源
    最近更新 更多