CDE

CDE

cde.qfox.nl

cde.qfox.nl

cde.qfox.nl

The CDE javascript is syntactic sugar that helps creating DHTML easier and faster by creating Custom DOM Elements.

// Click the link to change the background color

CDE.lnk('Click me!', function(){
  CDE.ColorPicker.show(this, {
    mixTarget: document.body,
    intOffsetY: 30,
    spriteUrl: '/img/cp/colorpicker_sprite.png',
    strBg0: 'http://cde.qfox.nl/img/cp/bg1.png',
    strBg1: 'http://cde.qfox.nl/img/cp/bg2.png',
    strBg2: 'http://cde.qfox.nl/img/cp/bg3.png',
    strBg3: 'http://cde.qfox.nl/img/cp/bg4.png',
    strBg4: 'http://cde.qfox.nl/img/cp/bg5.png',
    boolColorBoxes: true,
    boolBackgrounds: true, // dont show bg for text color... :)
    onChangeColor: function(c){
      // remove the previous stylesheet (by closure)
      // prevents cluttering up the dom with unused sheets
      //if (cdeCss) cdeCss.del(true,true);
      //cdeCss = onChange(c, arrCurrent[strLabel].bg).dba();
    },
    onChangeBg: function(url){
      // update current color
      //arrCurrent[strLabel].bg = url;
      // remove the previous stylesheet (by closure)
      // prevents cluttering up the dom with unused sheets
      //if (cdeCss) cdeCss.del(true,true);
      //cdeCss = onChange(arrCurrent[strLabel].color, url).dba();
    }
  });
}).addTo("link");