Commit 2edaabfe authored by Clement Ho's avatar Clement Ho

Fix image data-src

parent a510791b
...@@ -108,7 +108,7 @@ Object.assign(DropDown.prototype, { ...@@ -108,7 +108,7 @@ Object.assign(DropDown.prototype, {
// Help set the image src template // Help set the image src template
var imageTags = template.content.querySelectorAll('img[data-src]'); var imageTags = template.content.querySelectorAll('img[data-src]');
for(var i = 0; i < imageTags.length; i++) { for(var i = 0; i < imageTags.length; i++) {
var imageTag = imagetags[i]; var imageTag = imageTags[i];
imageTag.src = imageTag.getAttribute('data-src'); imageTag.src = imageTag.getAttribute('data-src');
imageTag.removeAttribute('data-src'); imageTag.removeAttribute('data-src');
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
%ul{ 'data-dynamic' => true } %ul{ 'data-dynamic' => true }
%li %li
%button.btn.btn-link %button.btn.btn-link
%img.avatar.avatar-inline{ 'src': '{{avatar_url}}', width: '30' } %img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' }
%strong %strong
{{name}} {{name}}
%span %span
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
%ul{ 'data-dynamic' => true } %ul{ 'data-dynamic' => true }
%li %li
%button.btn.btn-link %button.btn.btn-link
%img.avatar.avatar-inline{ 'src': '{{avatar_url}}', width: '30' } %img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' }
%strong %strong
{{name}} {{name}}
%span %span
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment