Showing
1 changed file
with
3 additions
and
2 deletions
@@ -18,6 +18,7 @@ var $ = require('yoho.jquery'), | @@ -18,6 +18,7 @@ var $ = require('yoho.jquery'), | ||
18 | 18 | ||
19 | LogoBrand.prototype = { | 19 | LogoBrand.prototype = { |
20 | init: function() { | 20 | init: function() { |
21 | + this.$element.addClass('logos-' + this.options.showNum); | ||
21 | this._sendRequest(); | 22 | this._sendRequest(); |
22 | }, | 23 | }, |
23 | _createHelper: function() { | 24 | _createHelper: function() { |
@@ -72,8 +73,8 @@ var $ = require('yoho.jquery'), | @@ -72,8 +73,8 @@ var $ = require('yoho.jquery'), | ||
72 | '<a href="\{{href}}"><img class="lazy" data-original="\{{img}}" alt=""></a>' + | 73 | '<a href="\{{href}}"><img class="lazy" data-original="\{{img}}" alt=""></a>' + |
73 | '\{{/brandList}}'; | 74 | '\{{/brandList}}'; |
74 | brandTpl = Handlebars.compile(brandHtml); | 75 | brandTpl = Handlebars.compile(brandHtml); |
75 | - $('.logo-brand').addClass('logos-' + that.options.showNum).html(brandTpl(data)); | ||
76 | - lazyLoad($('.logo-brand').find('img.lazy')); | 76 | + that.$element.html(brandTpl(data)); |
77 | + lazyLoad(that.$element.find('img.lazy')); | ||
77 | that._bindEvent(); | 78 | that._bindEvent(); |
78 | } | 79 | } |
79 | }); | 80 | }); |
-
Please register or login to post a comment