定制 fritzmg/contao-lazy-load-element 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fritzmg/contao-lazy-load-element

Composer 安装命令:

composer require fritzmg/contao-lazy-load-element

包简介

Contao extension to allow lazy loading of content elements or modules.

README 文档

README

Contao Lazy Load Element

Contao extension to allow lazy loading of content elements or modules.

When installed, this extension provides an additional content element where you can define another content element or module to be lazy loaded on page load. You also have the possibility to let the element reload periodically, once it has been loaded for the first time. And you are able to define, whether the element should only load once it is in the viewport.

To enable this functionality you must enable jQuery in the page layout.

When an element gets loaded or reloaded, either the event lazyload or lazyload-reload will be triggered on that element. This way you can execute your own JavaScript, once an element got loaded (for example to initialize other scripts on the loaded content).

$('#myLazyLoadElement').on('lazyload', function(event)
{
	// …
});

There is also a stylesheet included by default that shows an AJAX loader circle while the element is being loaded or reloaded. To remove it completely you can use this style:

.ce_lazyload:before,
.ce_lazyload:after,
.mod_lazyload:before,
.mod_lazyload:after {
	display: none;
}

Or simply change the styles to your liking. Have a look at the default styles in assets/lazyload.scss.

统计信息

  • 总下载量: 373
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2017-01-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固