轻量级动画模式弹出插件 jQuery人力资源内容

  • 源码大小:9.22KB
  • 所需积分:1积分
  • 源码编号:19JP-3482
  • 浏览次数:730次
  • 最后更新:2023年06月18日
  • 所属栏目:幻灯片
我要下载
加入收藏
本站默认解压密码:19jp.com 或 19jp_com

简介

HR Content是一个轻量级、动画化、响应迅速、可定制的jQuery模式插件,能够将任何网络内容覆盖在当前页面的顶部。

如何使用它:

1.将jQuery库和HR内容插件导入到HTML文档中。

  1. <link rel="stylesheet" href="/path/to/css/hrContentPopup.min.css" />
  2. <script src="/path/to/cdn/jquery.min.js"></script>
  3. <script src="/path/to/js/hrContentPopup.min.js"></script>

2.模式弹出窗口的HTML结构。

  1. <div class="example hr-popup">
  2. <!-- Modal Popup -->
  3. <div class="content">
  4. <!-- Title -->
  5. <h2>This is first box</h2>
  6. <!-- Modal Content -->
  7. <div class="data-starts">
  8. <p>
  9. ... Modal Content Here ...
  10. </p>
  11. </div>
  12. <a href="#" class="popupButton">Trigger Button</a>
  13. </div>
  14. </div>

3.调用顶部容器上的插件并完成。

  1. $(".example").hrContentPopup({
  2. // options here
  3. });

4.自定义触发事件。默认值:“点击”。

  1. $(".example").hrContentPopup({
  2. event: "mouseover",
  3. });

5.通过单击屏幕上的任何位置来确定是否允许关闭模式窗口。默认值:false。

  1. $(".example").hrContentPopup({
  2. popCloseAnywhere: true,
  3. });

6.设置模式窗口的高度。默认值:238px。

  1. $(".example").hrContentPopup({
  2. dataHeight: 400,
  3. });

7.设置模式窗口的选择器。默认值:“.hr弹出窗口”。

  1. $(".example").hrContentPopup({
  2. cssClass: ".hr-popup",
  3. });

8.设置触发按钮的选择器。默认值:“.popupButton”。

  1. $(".example").hrContentPopup({
  2. popupButton: ".popupButton",
  3. });

9.设置按钮类型。默认值:“sign”。

  1. $(".example").hrContentPopup({
  2. buttonType: "close",
  3. });

预览截图