1. rewrite the data-load data-unload event ;
In the random JS file to add the code;
functiondispatchpanelevent (fnc,mypanel) {if(typeofFNC = = = "string" &&WINDOW[FNC]) { returnWINDOW[FNC] (Mypanel); } Else if(Fnc.indexof (".")! ==-1){ varScope=window,items=fnc.split ("."), len=items.length,i=0; for(i;i<len-1;i++) {Scope=Scope[items[i]]; if(scope===undefined)return; } returnScope[items[i]] (Mypanel); }}$ (document). On ("Panelload",function(e) {varhasload=$ (E.target). attr ("Data-load"); returndispatchpanelevent (Hasload,e.target);}) $ (document). On ("Panelunload",function(e) {varhasload=$ (E.target). attr ("Data-unload"); returndispatchpanelevent (Hasload,e.target);})
This allows the data-load= ' test ' to be added to the panel's Div;
The following panel
<class= "Panel" ID= "Plugins" data-title= " Plugins " data-unloaddata-load= ' tests '>
which
function Test () { alert (' ddddd ');} function Tests () { alert (' xxxxx ');}
2. data-tab= "Settings" does not work;
<Divclass= "Panel"ID= "Changetab"Data-tab= "Settings">Changetab</Div> <Footer> <ahref= "#mainPage"class= "icon Home"data-transition= "MainPage"ID= "Settings">Main</a> <ahref= "#onePage"class= "icon HTML5"data-transition= "Slide">Onepage</a> <ahref= "#twoPage"class= "icon Trash"data-transition= "Up-reveal">Twopage</a> <ahref= "#threePage"class= "icon Trash"data-transition= "Up-reveal">Threepage</a> </Footer>
When jumping to changetab this panel footer the bottom should be the ID settings this highlight, but it is not highlighted;
By modifying the SetActiveTab function inside the af.ui.js;
SetActiveTab:function(Ele,view) {varHash; if(typeof(ele)!== "string") Hash=$ (ele). attr ("Data-tab"); View.find ("Footer"). Find ("a"). Removeclass ("pressed"). attr ("data-ignore-pressed", "true"). Filter ("[id= '" "+hash+"] "). AddClass ("pressed"); //var hash; //if (typeof (Ele)!== "string") //hash=$ (ele). Prop ("id"); //hash= "#" +hash; //view.find ("Footer"). Find ("a"). Removeclass ("pressed"). "Attr" ("data-ignore-pressed", "true"). Filter ("[href= '" + hash+ "']"). AddClass ("pressed");},
AppFrameWork (jqmobi) 3.0 settings