フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド数 [ 前へ | 次へ ]
toggle
cyril L
Liferay and JQuery ui accordion
2009/04/23 8:01
答え

cyril L

ランク: New Member

投稿数: 3

参加年月日: 2008/01/15

最近の投稿

Hello,

I try to use jQuery accordion with a new portlet and the classic theme.
I havn't javascript error but my accordion doesn't work.

Where is the problem ? Is it due to the classic theme ? Do I merge classic theme css with jQuery css ?
Thanks for your help !

My view.jsp :
 1
 2<%@ include file="/html/portlet/ext/menu_gauche_guest/init.jsp" %>
 3
 4<script type="text/javascript">
 5    jQuery(document).ready(function() {
 6        jQuery("#accordion").accordion();
 7    });
 8</script>
 9
10<div id="accordion">
11    <h3><a href="#">Section 1</a></h3>
12    <div>
13        <p>
14        This is my section 1
15        </p>
16    </div>
17    <h3><a href="#">Section 2</a></h3>
18    <div>
19        <p>
20        This is my section 2
21        </p>
22    </div>
23</div>
cyril L
RE: Liferay and JQuery ui accordion
2009/04/27 1:21
答え

cyril L

ランク: New Member

投稿数: 3

参加年月日: 2008/01/15

最近の投稿

No ideas ?
Christianto Sahat
RE: Liferay and JQuery ui accordion
2009/04/27 3:50
答え

Christianto Sahat

ランク: Regular Member

投稿数: 174

参加年月日: 2007/09/24

最近の投稿

Try to debug your javascript code using Mozilla Firefox browser + Firebug add-on. See if the script is being loaded and called.
Jaime Israel Ramírez Hernández
RE: Liferay and JQuery ui accordion
2009/06/06 15:16
答え

Jaime Israel Ramírez Hernández

ランク: Regular Member

投稿数: 115

参加年月日: 2008/04/14

最近の投稿

Hello!!!

I have a similar problem, tried to use the accordion plugin in a web content and it isn't working emoticon

Christianto Sahat:
Try to debug your javascript code using Mozilla Firefox browser + Firebug add-on. See if the script is being loaded and called.


Tried debugging it and seems like the ui.accordion script is called... but still it's not working, has anyone found a solution yet?

Thanks!!!!
Jaime Israel Ramírez Hernández
RE: Liferay and JQuery ui accordion
2009/06/06 16:33
答え

Jaime Israel Ramírez Hernández

ランク: Regular Member

投稿数: 115

参加年月日: 2008/04/14

最近の投稿

Solved in here
Ali Shahrami
RE: Liferay and JQuery ui accordion
2009/10/30 9:30
答え

Ali Shahrami

ランク: Junior Member

投稿数: 52

参加年月日: 2009/07/31

最近の投稿

Jaime Israel Ramírez Hernández:
Solved in here


I had the same issue and it took me a while to solve it. First I used a work around by adding referrence to jquery-ui.css (ex: jquery-ui-1.7.2.custom.css) in top_head.jsp /html/common/themse/top_head.jsp

<link type="text/css" href="/html/css/jquery-ui-1.7.2.custom.css" rel="stylesheet" />

I found it a dirty solution but it worked perfectly. Then I found a better solution which is as follows:

1- created css.jsp (or anything you want to name it.
2- added content of jquery-ui-1.7.2.custom.css to css.jsp
3- added the following xml elements to my <portlet> in my lifray-portlet-ext.xml
<header-portlet-css>/html/portlet/ext/personalization_wizard/css.jsp</header-portlet-css>
<add-default-resource>true</add-default-resource>

if anybody else has found better solutions, please post them.