Skip to content

Instantly share code, notes, and snippets.

function initVml(){
if(!Browser.Engine.trident) return;
document.namespaces.add('v', 'urn:schemas-microsoft-com:vml');
vmlSheet=new StyleSheet().addRule('v\\:*', 'behavior:url(#default#VML)');
}
initVml();
var rect=new Element('v:rect',{
styles:{
width: 100,
height: 100,
var StyleSheet=new Class({
initialize: function(){
this.createSheet();
this.rules={};
this.styles={};
this.index=[];
},
createSheet: function(){
//http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20233392.html
function CopyPlusSelect(FData) {
var dataVal = eval('document.'+FData);
dataVal.focus();
dataVal.select();
var copyText = dataVal.value;
if (window.clipboardData) { // IE send-to-clipboard method.
window.clipboardData.setData('Text', copyText);
} else if (window.netscape) {
function createSheet(){
var style = new Element('style').inject(document.head);
return style.styleSheet||style.sheet;
}
/**
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
* Author: Drew Diller
* Email: [email protected]
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
* Version: 0.0.7a
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
*
* Example usage:
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
function getClipboard() {
if (window.clipboardData) {
// the IE-manier
return(window.clipboardData.getData('Text'));
// waarschijnlijk niet de beste manier om Moz/NS te detecteren;
// het is mij echter onbekend vanaf welke versie dit precies werkt:
} else if (window.netscape) {