1 | ;
|
2 |
|
3 | var widthElements = [ 'table', 'td', 'img' ];
|
4 |
|
5 | module.exports = function (el, $) {
|
6 | var i,
|
7 | pxWidth;
|
8 |
|
9 | if (widthElements.indexOf(el.name) > -1) {
|
10 | for (i in el.styleProps) {
|
11 | if (el.styleProps[i].prop === 'width' && el.styleProps[i].value.match(/px/)) {
|
12 | pxWidth = el.styleProps[i].value.replace('px', '');
|
13 |
|
14 | $(el).attr('width', pxWidth);
|
15 | return;
|
16 | }
|
17 | }
|
18 | }
|
19 | };
|