Authored by 2586703@qq.com

related-post js修改

... ... @@ -31,10 +31,14 @@
</script>
<script src="//localhost:5000/dist/all-debug.js"></script>
<script type="text/javascript">
seajs.use(['yohobuy-mobile/1.0.0/public/js/article-type-three-debug','yohobuy-mobile/1.0.0/public/js/related-post-debug'], function(article) {
seajs.use(['yohobuy-mobile/1.0.0/public/js/article-type-three-debug','yohobuy-mobile/1.0.0/public/js/related-post-debug'], function(article,relatedPost) {
if (article) {
article.init();
}
if(relatedPost) {
relatedPost.init();
}
});
</script>
</html>
\ No newline at end of file
... ...
... ... @@ -7,7 +7,11 @@
var $ = require('jquery'),
ellipsis = require('mlellipsis');
ellipsis.init();
$(".post-list").find("span").each(function(){
$(this).mlellipsis(2);
})
\ No newline at end of file
exports.init = function() {
ellipsis.init();
$(".post-list").find("span").each(function(){
$(this).mlellipsis(2);
})
}
... ...