Closed kouennrin closed 9 years ago
Hi there, With remove, do you really mean remove them completely from the panel (from the DOM)? That would mean only the close and minimize/normalize controls would remain. If that's what you intend you can do this via the callback when creating the panel as follows:
$.jsPanel({
callback: function(panel){
$(".jsPanel-btn-max, .jsPanel-btn-small, .jsPanel-btn-smallrev", panel.header.controls).remove();
// more callback routines as needed ...
}
});
If you need more panels without those controls by default you could use option.template as follows:
function templateOne() {
// copy standard template
var template = $(jsPanel.template);
// select controls section of copied template
var controls = $('.jsPanel-hdr-r', template);
// remove controls from template
$(".jsPanel-btn-max, .jsPanel-btn-small, .jsPanel-btn-smallrev", controls).remove();
// and return the new template
return template;
}
// call .jsPanel(); with option.template
$.jsPanel({
template: templateOne(),
position: 'center',
theme: 'light',
callback: function (panel) {
// whatever you need ...
}
});
Hope I could help?
Thank you very much, as you said this issue is resolved. jsPanel is a very great and useful library.
I tried many ways, but not able to hide those functions. Please help ,Thanks!