The Ligerui framework tree is dynamically used in tab tags, and dynamically creates tab tags after clicking on the tree, similar to the usual IFRAME framework functionality
Key code in the tree
//Tree Initialization$("#tree1"). Ligertree ({nodewidth: the,//Tree Control widthData:createdata (),//Tree Data SourceCheckBoxfalse,//whether to use a CheckBoxIdfieldname:'ID',//Binding IDIsexpand:2,//whether to expand node false to not expand true to show all nodes specify a number to expand the specified nodeSlidefalse,//node spread effect false No effect true slow spread effectParentidfieldname:'PID',//bind husband IDOnselect:function (node) {//Node Click event varTabID = $ (node.target). attr ("TabID"); if(Node.data.url.length < the)return; if(!tabid) { //determine if the tabitem exists, and there is an expansion of the itemTabID =NewDate (). GetTime (); $ (node.target). attr ("TabID", TabID)} Tabadd (TabID, Node.data.text, Node.data.url); } });
tab Dynamic Add node key code
//left panel initialization$("#accordion1"). Ligeraccordion ({}); Accordion= Liger.Get("Accordion1");//Declarations Panel//Add tab tabfunction Tabadd (tabid, Tabtext, TabURL) {Tab.addtabitem ({tabid:tabid,//Tab IDText:tabtext,//Tab NameUrl:taburl//Tab Link }); }
Using the Tree and tab controls dynamically with the code above, the intern iframe function
Jquery Ligerui Framework Learning (ii) tree in tab tag to implement IFRAME function