2011-11-03 50 views
0

中的index.php我的標籤被聲明爲:jQuery UI的標籤 - IE 9.0沒有選項卡內打開鏈接

$(function() { 
      $("#tabs").tabs({ 
       load: function(event, ui) { 
        console.log("load event ran"); 
        $('a', ui.panel).live("click", function() { 
          $(ui.panel).load(this.href); 
          return false; 
          }); 
        } 

      }); 

     }); 

我有一個鏈接到外部php文件選項卡來加載內容:

<div id="tabs"> 
      <ul> 
       <li><a href="content.php?div=Production">Production</a></li> 
       <li><a href="content.php?div=Digital">Digital</a></li> 
      </ul> 
     </div> 

這些工作! 但裏面的生產內容,我有鏈接:

<ul> 
    <li><a href="content.php?div=Production&p=add" class="tabLink">New product</a></li> 
    <li><a href="content.php?div=Production&p=search" class="tabLink">Search</a></li> 
</ul> 

其調用同一content.php content.php本身調用其他文件取決於GET標準:

$div = htmlspecialchars(trim($_REQUEST["div"])); 
$p = htmlspecialchars(strtolower($_GET["p"])); 
$menu =''; 
switch($div){ 
    case "Production": 
     switch($p){ 
      case "add": 
       include('Production/add.php'); 
       $menu = 'Production/production.php'; 
       break; 
      case "search": 
       include('Production/search.php'); 
       $menu = 'Production/production.php'; 
       break; 
      default: 
       include('Production/production.php'); 
     } 
     break; 
    case "Digital": 
     switch($p){ 
/*   case "add": 
       include('Production/add.php'); 
       break; 
      case "search": 
       include('Production/search.php'); 
       break; */ 
      default: 
       echo "Nothing here yet"; 
     } 
     break; 
    default: 
     echo "Please select department"; 
} 

爲什麼IE不內守index.php,而實際上是去content.php?

我是否需要針對TABs聲明的IE進行特定的破解? 完全在鉻和Fireforx(如常)

回答

0

通過使用liveredirect

$(function() { 

     $("#tabs").tabs({ 
      load: function(event, ui) { 
       $('a', ui.panel).live("click", function() { 
         $(ui.panel).load(this.href); 
         return false; 
         }); 
      } 
     }); 
     $("#tabs").bind('tabsshow',function(event, ui) { 
      window.location = ui.tab; 
     }) 
    }); 
固定這