ie7.js
1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* To avoid CSS expressions while still supporting IE 7 and IE 6, use this script */
/* The script tag referencing this file must be placed before the ending body tag. */
/* Use conditional comments in order to target IE 7 and older:
<!--[if lt IE 8]><!-->
<script src="ie7/ie7.js"></script>
<!--<![endif]-->
*/
(function() {
function addIcon(el, entity) {
var html = el.innerHTML;
el.innerHTML = '<span style="font-family: \'icon-cooperation\'">' + entity + '</span>' + html;
}
var icons = {
'icon-cooperation-condition': '',
'icon-cooperation-Not-checked': '',
'icon-cooperation-personnel': '',
'icon-cooperation-BatchOperation': '',
'icon-cooperation-Collection-o': '',
'icon-cooperation-Collection': '',
'icon-cooperation-comment': '',
'icon-cooperation-delete': '',
'icon-cooperation-edit': '',
'icon-cooperation-Fabulous': '',
'icon-cooperation-follow-o': '',
'icon-cooperation-follow': '',
'icon-cooperation-Quote': '',
'icon-cooperation-Set-up': '',
'icon-cooperation-top': '',
'icon-cooperation-PendingApproval': '',
'0': 0
},
els = document.getElementsByTagName('*'),
i, c, el;
for (i = 0; ; i += 1) {
el = els[i];
if(!el) {
break;
}
c = el.className;
c = c.match(/icon-[^\s'"]+/);
if (c && icons[c[0]]) {
addIcon(el, icons[c[0]]);
}
}
}());