Skip to content

Commit 58258de

Browse files
save file
1 parent b95191f commit 58258de

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

‎utils/editors/html/code-explorer/v1.0/code-explorer-v1.0.html‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,37 @@
208208
btn.fn = function(){
209209

210210
ui.mode = 'fn';
211+
btn.active('fn');
211212
update.fn();
212-
$(shadow,'#hdr #fn').classList.add('active');
213-
$(shadow,'#hdr #html').classList.remove('active');
214213

215214
}//fn
216215

217216

218217
btn.html = function(){
219218

220219
ui.mode = 'html';
220+
btn.active('html');
221221
update.html();
222-
$(shadow,'#hdr #fn').classList.remove('active');
223-
$(shadow,'#hdr #html').classList.add('active');
224222

225223
}//html
226224

227225

226+
btn.active = function(id){
227+
228+
var list = $.all(shadow,'#hdr img');
229+
list.forEach(img=>{
230+
231+
if(img.id==id){
232+
img.classList.add('active');
233+
}else{
234+
img.classList.remove('active');
235+
}
236+
237+
});
238+
239+
}//active
240+
241+
228242
//:
229243

230244

0 commit comments

Comments
 (0)