UNPKG
inline-css
Version:
latest (4.0.3)
4.0.3
4.0.2
4.0.1
4.0.0
3.0.0
2.6.3
2.6.2
2.6.1
2.6.0
2.5.1
2.5.0
2.4.2
2.4.1
2.4.0
2.3.1
2.3.0
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.1
2.1.0
2.0.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Inline css into an html file.
github.com/jonkemp/inline-css
jonkemp/inline-css
inline-css
/
lib
/
removeClassId.js
14 lines
(10 loc)
•
291 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict'
;
module
.
exports
=
function
(
el, $
) {
var
selectors = [
'class'
,
'id'
]; selectors.
forEach
(
function
(
selector
) {
var
attribute = $(el).
attr
(selector);
if
(
typeof
attribute !==
'undefined'
) { $(el).
removeAttr
(selector); } }); };