2017-04-22 22 views
0

所有似乎完美,並在鉻中工作,但是一旦我在safari,mozilla和IE中打開什麼都沒有發生。Bootstrap模式彈出不工作在IE和Mozilla

這裏是下面的代碼:

<!-- MAIN CONTENT - CATEGORIES --> 
 
<div class="container"> 
 
    <div class="row"> 
 
    <div class="col-xs-12"> 
 
     <div class="home_cats"> 
 
     <div class="clearfix"> 
 
      <div class="row"> 
 
      <?$i=0; foreach($categs as $c):?> 
 
       <?if($c['id_category_parent'] == 1 AND $c['id_category'] != 1 AND ! in_array($c['id_category'], $hide_categories)):?> 
 
       <div class="col-xs-12 col-sm-4 col-md-4"> 
 
        <div class="panel panel-home-categories"> 
 
        <div class="panel-heading"> 
 
         <a title="<?=HTML::chars($c['name'])?>" href="<?=Route::url('list', array('category'=>$c['seoname'], 'location'=>$user_location ? $user_location->seoname : NULL))?>"> 
 
         <?$icon_src = new Model_Category($c['id_category']); $icon_src = $icon_src->get_icon(); if(($icon_src)!==FALSE):?> 
 
          <img src="<?=Core::imagefly($icon_src,30,20)?>" alt="<?=HTML::chars($c['name'])?>"> 
 
          <?endif?> 
 
          <?=mb_strtoupper($c['name']);?> 
 
           <?if (Theme::get('category_badge')!=1) : ?> 
 
           (
 
           <?=number_format($c['count'])?>) 
 
            <?endif?> 
 
         </a> 
 
        </div> 
 
        <div class="panel-body"> 
 
         <ul class="list-group"> 
 
         <?$ci=0; foreach($categs as $chi):?> 
 
          <?if($chi['id_category_parent'] == $c['id_category'] AND ! in_array($chi['id_category'], $hide_categories)):?> 
 
          <?if ($ci < 3):?> 
 
           <li class="list-group-item"> 
 
           <a title="<?=HTML::chars($chi['name'])?>" href="<?=Route::url('list', array('category'=>$chi['seoname'], 'location'=>$user_location ? $user_location->seoname : NULL))?>"> 
 
            <?if (Theme::get('category_badge')!=1) : ?> 
 
            <span class="pull-right badge badge-success"><?=number_format($chi['count'])?></span> 
 
            <?endif?> 
 
             <?=$chi['name'];?> 
 
           </a> 
 
           </li> 
 
           <?endif?> 
 
           <?$ci++; if($ci == 3):?> 
 
            <li class="list-group-item"> 
 
            <a role="button" class="show-all-categories" data-cat-id="<?=$c['id_category']?>"> 
 
             <?=__("See all categories")?> <span class="glyphicon glyphicon-chevron-right pull-right"></span> 
 
            </a> 
 
            </li> 
 
            <?endif?> 
 
            <?endif?> 
 
             <?endforeach?> 
 
         </ul> 
 
        </div> 
 
        </div> 
 
       </div> 
 
       <? $i++; if ($i%3 == 0) echo '<div class="clear"></div>';?> 
 
        <?endif?> 
 
        <?endforeach?> 
 
      </div> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div> 
 
<div id="modalAllCategories" class="modal fade" tabindex="-1" data-apiurl="<?=Route::url('api', array('version'=>'v1', 'format'=>'json', 'controller'=>'categories'))?>"> 
 
    <div class="modal-dialog modal-sm"> 
 
    <div class="modal-content"> 
 
     <div class="modal-header"> 
 
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
 
     </div> 
 
     <div class="modal-body"> 
 
     <ul class="list-group"> 
 
     </ul> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div> 
 
<!-- // MAIN CONTENT - CATEGORIES -->

我想插入列表視圖彈出窗口,當我點擊該按鈕。示例中的內容相同。 這裏是例子:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
 
<script src="http://getbootstrap.com/dist/js/bootstrap.min.js"></script> 
 
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css" "> 
 

 

 
<div class="body-content"> 
 
<div align="center"> 
 

 
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button> 
 

 
</div> 
 

 
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"> 
 
    <div class="modal-dialog modal-sm" role="document"> 
 
    <div class="modal-content"> 
 
     <div class="modal-header sub-modal"> 
 
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
 
     </div> 
 
    
 
      <div class="modal-body"> 
 
       <ul class="list-group"> 
 
       <li class="list-group-item"><a href="#"> Here where i want the list view 1</a></li> 
 
       <li class="list-group-item"><a href="#"> Here where i want the list view 2</a></li> 
 
       <li class="list-group-item"><a href="#"> Here where i want the list view 3</a></li> 
 
       <li class="list-group-item"><a href="#"> Here where i want the list view 4</a></li> 
 
       </ul> 
 
      </div> 
 
     
 
    </div> 
 
    </div> 
 
</div> 
 
</div> 
 

 
<style> 
 
.body-content{padding-top:100px;} 
 
.sub-modal{background:#4285f4;} 
 
li {list-style-type: none;} 
 
.list-group-item { 
 
    position: relative; 
 
    display: block; 
 
    padding: 10px 15px; 
 
    margin-bottom: -1px; 
 
    background-color: #fff; 
 
    border: 1px solid #ddd; 
 
} 
 
li:hover{background:#4285f4;} 
 
a:focus, a:hover { 
 
    color: #fff; 
 
    text-decoration: none; 
 
} 
 

 
</style>

+0

你的問題不是與你的任何標籤,而是你看起來不明白的HTML中的「其他」語言。 –

+0

我使它只能在Chrome中工作,但我需要清理我的網站緩存,如果我打開網站的其他頁面。當它無法正常工作時,我從chrome得到這個錯誤(當按下F12時)請求的資源上沒有'Access-Control-Allow-Origin'標頭。 Origin'linkinads.com';因此不被允許訪問。 ,從IE我得到這個錯誤:SEC7120:起源linkinads.com沒有在Access-Control-Allow-Origin頭中找到。任何建議請!謝謝 –

回答

0

幾乎24小時這一問題的工作後!我終於找到了解決方案,我忘記了在我的網站上使用(https)即時通訊,現在我通過將其置於htaccess中解決了這個問題。

0

在您的鏈接標記刪除多餘的引號(「),我希望它的工作原理

+0

我實際上使它工作,但在Mozilla,Safari瀏覽器,IE瀏覽器,它不工作!另外,當我訪問我的網站的其他頁面,並返回到主頁它不能再工作我需要清除緩存,使其工作?這是一些像腳本一樣的權限...爲瀏覽器 –

+0

只是添加即時從鉻獲得錯誤:沒有'訪問控制允許來源'標題出現在請求的資源。原因'https://www.linkinads.com'因此不被允許訪問。 –

+0

而在IE上,我得到這個錯誤:SEC7120:來源https://www.linkinads.com沒有在Access-Control-Allow-Origin標題中找到。 –

相關問題