HI all, great library, top work!
I had one gripe, which was I didn't like the default 85% opacity and wanted to change it without having to create a whole new css just for that. So I implemented a new parameter, simply called "opacity" which you set to anything up to 100.
Lines changed are as follows (asterisk next to the added/changed lines):
Code:
function scanBO(curNode) {
if (checkElemBO(curNode.title)) {
* curNode.opacity=getParam('opacity',curNode.title);
* if(curNode.opacity=='') curNode.opacity = '85';
curNode.boHDR=getParam('header',curNode.title);
curNode.boBDY=getParam('body',curNode.title);
Note for above: I use '85' as the default opacity if none is specified. Ideally, it should be taken from the existing style, in case a custom style is used. And of course I'm assuming the same opacity is wanted for both header and body.
Code:
function applyStyles() {
... (several lines up here) ...
dvHdr.innerHTML=CBE.boHDR;
dvBdy.innerHTML=CBE.boBDY;
* // apply preferred opacity
* dvHdr.style.filter='alpha(opacity=' + CBE.opacity + ')'; // IE
* dvHdr.style.opacity='' + (CBE.opacity / 100); // FF
* dvBdy.style.filter='alpha(opacity=' + CBE.opacity + ')'; // IE
* dvBdy.style.opacity='' + (CBE.opacity / 100); // FF
ah=false;
ab=false;
That's it I think. May be a better way of doing it, but that was quick and easy. Now you can put "opacity=[100]" in your parameter list to change the default!
Thanks again for a great library, it rocks.