Liferay DXP Free Tier    |    From download to running in minutes    |    Get started →

Blogs

Make your Page Comments input forms sliding

Wan Gavin
Wan Gavin
阅读少于一分钟

Many of our portlets have the ability for users to leave comments and replies such as Wiki, Page Comments, Blogs, Journal Content, etc. When users hit the Reply button, a simple text box appears. This new feature will add a sliding effect when users hit the Reply button. The simple text box will slide into view instead of just appearing.

ok, let do it.

we need modify the portal-web/docroot/html/taglib/ui/discussion/page.jsp

Firstly, modify the show/hide form function

Before adding the slide feature the code is like this:

document.getElementById(rowId).style.display = "";

document.getElementById(rowId).style.display = 'none';

 

Change it to:

jQuery('#'+rowId).slideDown("slow");

jQuery('#'+rowId).slideUp("slow");

 

Secondly,we hava to chang the

<tr id="<%= namespace %>postReplyForm<%= i %>" style="display: none;">

to

<div id="<%= namespace %>postReplyForm<%= i %>" style="display: none;">

This will make sure the code works in IE.

Now your reply forms can have the sliding feature.

 

 

 

页面评论

Related Assets...

未找到结果

More Blog Entries...

Ben Turner
十一月 26, 2026
Himanshu Chauhan
十一月 20, 2026
Tony Lim
十一月 19, 2026