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

Blogs

Make your Page Comments input forms sliding

Wan Gavin
Wan Gavin
Uma leitura de menos de um minuto

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.

 

 

 

Comentários da Página

Related Assets...

Nenhum Resultado Encontrado

More Blog Entries...

Ben Turner
Novembro 26, 2026
Himanshu Chauhan
Novembro 20, 2026
Tony Lim
Novembro 19, 2026