Tribune

Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Madhan PE
How to Use Multiple jQuery version with Liferay 4.3.3
27 dicembre 2012 10.06
Risposta

Madhan PE

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 26 dicembre 2012

Messaggi recenti

Hi,
I need to introduce a new jQuery 1.8.3 for implementing a popup dialog for particular portlet(this jquery should not affect any other portlet or functionality) in Liferay 4.3.3 with default jQuery version. My Liferay 4.3.3 uses jQuery 1.1.4 now. So I need to have both jQuery 1.1.4 and 1.8.3 in my Liferay 4.3.3
Please reply with steps to follow to achieve this. Immediate reply is appreciable.

Thanks in advance.
Brian Scott Schupbach
RE: How to Use Multiple jQuery version with Liferay 4.3.3
27 dicembre 2012 11.57
Risposta

Brian Scott Schupbach

Punteggio: Expert

Messaggi: 329

Data di Iscrizione: 23 ottobre 2008

Messaggi recenti

1
2var $yournamespece = jQuery.noConflict(true);
3// now use $yournamespace instead of $
4$yournamespace('selector')
Madhan PE
RE: How to Use Multiple jQuery version with Liferay 4.3.3
27 dicembre 2012 21.29
Risposta

Madhan PE

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 26 dicembre 2012

Messaggi recenti

Thanks Brian,

1. I have added my jQuery 1.8.3 in this location "\liferay-portal.war\html\js\jquery".
There is already jQuery 1.1.4 is in the same location.
2. I have included below line in my them in the location "\liferay-portal.war\html\themes\classic\templates\portal_normal.vm".
"<script type="text/javascript" src="/html/js/jquery/jquery-1.8.3.js"></script>"

<head>
<title>$company_name - $the_title</title>

$theme.include($top_head_include)

#css ($css_main_file)
#js ($js_main_file)

#if ($company_logo != "")
<style type="text/css">
#banner .logo {
padding: 0.52em 0.6em 0.53em;
}

#banner .logo a {
background: url($company_logo) no-repeat;
display: block;
font-size: 0;
height: ${company_logo_height}px;
text-indent: -9999em;
width: ${company_logo_width}px;
}
</style>
#end
<script type="text/javascript" src="/html/js/jquery/jquery-1.8.3.js"></script>
</head>

3. And in my JSP page I have used like below.

<link rel="stylesheet" href="/html/js/jquery/jquery-ui.css">
<script type="text/javascript" src="/html/js/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="/html/js/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript">
var jq183 = $.noConflict(true);
jq183( "#dialog" ).dialog({ autoOpen: false });
jq183( "#more_info" ).click(function() {
jq183( "#dialog" ).dialog( "open" );
});
</script>

But it is not working.
What went wrong here?
Madhan PE
RE: How to Use Multiple jQuery version with Liferay 4.3.3
30 dicembre 2012 6.09
Risposta

Madhan PE

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 26 dicembre 2012

Messaggi recenti

Can anyone please reply immediately, if you know how to do it? I am in need of this.