2013-03-20 89 views
0
$(document).ready(function(){ 
    $("#tree").jstree({ 
     "xml_data" : { 
      "ajax" : { 
       "url" : "jstree.xml"    
      }, 

      "xsl" : "nest" 

      }, 
    "themes" : { 

      "theme" : "classic", 

      "dots" : true, 

      "icons" : true 

     }, 
      "ui": { 
      "initially_select" : [ "#1234" ] 
     }, 
    "search" : { 

       "case_insensitive" : true, 

       "ajax" : { 

        "url" : "tree.xml" 

       } 

      }, 
    "plugins" : ["themes", "xml_data", "ui","types", "search", "cookies"], 
    "core" : { "initially_open" : [ "12345" ] } 
    }).bind("select_node.jstree", function (event, data) { 
      var node_id = data.rslt.obj.attr("id"); 
      $.cookie("example", node_id, { path: '/', expires:7 }); 
      window.open('new.html', '_newtab','width=800,height=1000,resizable=1,scrollbars=1'); 

    }); 

我試圖jstree來填充樹和節點上單擊時,我需要啓動一個名爲new.html使用Cookie來存儲的價值新窗口節點ID。有用。但我需要的是,當點擊jstree節點時,我需要一個新的new.html窗口並單擊另一個節點,而不是更新new.html,我需要另一個窗口以及新的node_id。因此,需要使用new.html爲每個node_id指定多個窗口。這可能與jQuery的?打開多個窗口時,點擊jstree節點

回答

2

具有如下的空參數的竅門。

window.open('new.html', '','width=800,height=1000,resizable=1,scrollbars=1'); 
+0

您可以接受您自己的答案... – Radek 2013-03-21 21:52:22

相關問題