美文网首页
layui的弹出层效果在导航中的使用

layui的弹出层效果在导航中的使用

作者: 阿根廷斗牛 | 来源:发表于2017-09-06 14:07 被阅读0次

    View.popup = function (e,data) {

       e.unbind('click');

        e.click(function () {

             layer.open({

                      type: 1,

                     scrollbar:false,

                     area: [data.width + 'px', data.height + 'px'],

                    content: $('#' + data.id),

                    end:function(){

                            $('#' + data.id).hide();

                          }

                 });

             });

    };

    注意:这里的data-id和弹窗效果的id保持一致,所以实现以上的效果

    相关文章

      网友评论

          本文标题:layui的弹出层效果在导航中的使用

          本文链接:https://www.haomeiwen.com/subject/htimjxtx.html