如何用适当的widh为div提供点网点并提供阅读链接 [英] How to provide dot dot dot to div with proper widh and provide read link to expend

查看:59
本文介绍了如何用适当的widh为div提供点网点并提供阅读链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我提供了80px的高度并提供了更多的锚点链接。



这里我保持了10条记录。

当我点击下一页点点点样式已经破坏而没有应用样式的readmore锚列表。

你能帮我解决如何维护点点。

查看代码



I have div it that i have provided height with 80px and provide anchor link as Read More.

Here i have maintained 10 records perpage.
when i click on next page the dot dot dot style has destroyed and not applied style for readmore anchor list.
Could you please help me how to maintain dot dot dot.
View code

<<div class="expert-summary">>
      
      
                                        @Model.Summary data
                                        <<a href="#" class="readMoreLink">>Read More<</a>>
                                    <</div>>


Js Code

function hideLinkIfNoTruncation(isTruncated, origContent) {
            if (!isTruncated) {
                $('.readMoreLink', this).remove();
            }
            
        }

        function clicked() {
            var div = $(this).closest('.expert-summary');
            div.trigger('destroy').find('.readMoreLink').remove();
            div.height('auto');
            return false;
        }

        $(document).ready(function () {
            $(".expert-summary").dotdotdot({
                after: "a.readMoreLink",
                callback: hideLinkIfNoTruncation
            });

            $('a.readMoreLink').on('click', clicked);
        });


Not maintain styles until end of the pagination

推荐答案

('。readMoreLink',此)卸下摆臂();
}

}

函数clicked(){
var div =
('.readMoreLink', this).remove(); } } function clicked() { var div =


(this).closest ( '专家-摘要');
div.trigger('destroy')。find('。readMoreLink')。remove();
div.height('auto');
返回false;
}
(this).closest('.expert-summary'); div.trigger('destroy').find('.readMoreLink').remove(); div.height('auto'); return false; }


(document).ready(function(){
(document).ready(function () {


这篇关于如何用适当的widh为div提供点网点并提供阅读链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆