Back to top

Autore Topic: Problema 2 Javascript  (Letto 1700 volte)

Offline ajeje989

  • Esploratore
  • **
  • Post: 76
    • Mostra profilo
Problema 2 Javascript
« il: 09 Mag 2013, 08:00:12 »
Salve a tutti,
è da un po che non riesco a venirne a capo.

Sul mio sito internet http://teamimpulsive.eu ho istallato lo slide  ck_slideshow e fin qui tutto bene.

Adesso ho esigenza di inserire dei javascript esterni nel sito..

In altre pagine dove lo slide non è presente lo javascript funziona correttamente.. Invece nella homepage ( dove c'è ck_slideshow) cl_slideshow non mi funziona.

Vi allego il codice...

Questo messo in un modulo
Codice: [Seleziona]
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/ajeje.1.3.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.transform-0.8.0.min.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.banner.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.transform-0.8.0.min.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.banner.js"></script>
<script type="text/javascript">// <![CDATA[
$(function() {
                //we want 5 steps / slides for the first banner
                //let's define what happens for each one:
               
                /*
                the variable steps has the following structure:
                steps:[step1,step2,...,stepN]
                On each step/transition we define the transition for each one of the areas in the banner
                For the first banner for example, we have 3 areas, each one with a specific number
                of images (the images inside of the "ca_wrap" div). One image is shown as default,
                which for our examples is always the first one (1).
                So as an example, our first step/transition can be:
                [{"to" : "2"}, {"effect": "zoomOutRotated-zoomInRotated"}],
                [{"to" : "1"}, {}],
                [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}]
                This means that for the first transition, the first and third areas are going to show
                their second image, and the second area remains untouched. When we change each image we
                apply a specific effect, which is defined in the plugin.
                */
                $('#ca_banner1').banner({
                    steps : [
                        [
                            //1 step:
                            [{"to" : "2"}, {"effect": "zoomOutRotated-zoomInRotated"}],
                            [{"to" : "1"}, {}],
                            [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}]
                        ],
                        [
                            //2 step:
                            [{"to" : "3"}, {"effect":"slideOutTop-slideInTop"}],
                            [{"to" : "1"}, {}],
                            [{"to" : "2"}, {}]
                        ],
                        [
                            //3 step:
                            [{"to" : "4"}, {"effect": "zoomOut-zoomIn"}],
                            [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}],
                            [{"to" : "2"}, {}]
                        ],
                        [
                            //4 step
                            [{"to" : "5"}, {"effect": "slideOutBottom-slideInTop"}],
                            [{"to" : "2"}, {}],
                            [{"to" : "3"}, {"effect": "zoomOut-zoomIn"}]
                        ],
                        [
                            //5 step
                            [{"to" : "1"}, {"effect": "slideOutLeft-slideInLeft"}],
                            [{"to" : "1"}, {"effect": "zoomOut-zoomIn"}],
                            [{"to" : "1"}, {"effect": "slideOutRight-slideInRight"}]
                        ]
                    ],
                    total_steps    : 5,
                    speed : 3000
                });
               
                //we want 4 steps/slides for the second banner:
                $('#ca_banner2').banner({
                    steps : [
                        [
                            //1 step:
                            [{"to" : "2"}, {"effect": "slideOutTop-slideInTop"}],
                            [{"to" : "2"}, {"effect": "slideOutTop-slideInTop"}]
                        ],
                        [
                            //2 step:
                            [{"to" : "1"}, {"effect": "slideOutRight-slideInRight"}],
                            [{"to" : "1"}, {"effect": "slideOutLeft-slideInLeft"}],
                        ],
                        [
                            //3 step:
                            [{"to" : "2"}, {"effect": "slideOutLeft-slideInLeft"}],
                            [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}]
                        ],
                        [
                            //4 step:
                            [{"to" : "1"}, {"effect":"zoomOutRotated-zoomInRotated"}],
                            [{"to" : "1"}, {"effect": "zoomOutRotated-zoomInRotated"}],
                        ]
                    ],
                    total_steps    : 4,
                    speed         : 2000
                });
            });
// ]]></script>

Come vi dicevo nelle altre pagine del sito lo javascript funziona, il problema sorge il modulo ck_slideshow è presente nella pagina.

Ho ultima versione di Joomla, per maggiori info scrivete pure..


Aggiornamento /

Ho provato a togliere questo dal modulo

<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/ajeje.js"></script>

e inserire questo tra i tag head del sito

<?php
JHTML::script('ajeje.js', 'templates/teamimpulsive2013/js/');
?>


In questa maniera lo slide si vede in homepage , ma altro javascipt non mi fa animazione :(
« Ultima modifica: 09 Mag 2013, 08:14:43 da ajeje989 »

mau_develop

  • Visitatore
Re:Problema 2 Javascript
« Risposta #1 il: 09 Mag 2013, 08:14:51 »
perchè carichi 2 volte gli stessi script?
vuol dire che hai sbagliato qualcosa, come si fa a dirti dove se non si capisce come e dove li hai inseriti?
« Ultima modifica: 09 Mag 2013, 08:16:29 da M_W_C »

Offline ajeje989

  • Esploratore
  • **
  • Post: 76
    • Mostra profilo
Re:Problema 2 Javascript
« Risposta #2 il: 09 Mag 2013, 08:25:31 »
Ciao, hai ragione nella confusione ho sbagliato a scriverti bene qui il codice..

te li riscrivo


Citazione

<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/ajeje.js></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.transform-0.8.0.min.js"></script>
<script type="text/javascript" src="http://teamimpulsive.eu/templates/teamimpulsive2013/js/jquery.banner.js"></script>
<script type="text/javascript">// <![CDATA[
$(function() {
                //we want 5 steps / slides for the first banner
                //let's define what happens for each one:
               
                /*
                the variable steps has the following structure:
                steps:[step1,step2,...,stepN]
                On each step/transition we define the transition for each one of the areas in the banner
                For the first banner for example, we have 3 areas, each one with a specific number
                of images (the images inside of the "ca_wrap" div). One image is shown as default,
                which for our examples is always the first one (1).
                So as an example, our first step/transition can be:
                [{"to" : "2"}, {"effect": "zoomOutRotated-zoomInRotated"}],
                [{"to" : "1"}, {}],
                [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}]
                This means that for the first transition, the first and third areas are going to show
                their second image, and the second area remains untouched. When we change each image we
                apply a specific effect, which is defined in the plugin.
                */
                $('#ca_banner1').banner({
                    steps : [
                        [
                            //1 step:
                            [{"to" : "2"}, {"effect": "zoomOutRotated-zoomInRotated"}],
                            [{"to" : "1"}, {}],
                            [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}]
                        ],
                        [
                            //2 step:
                            [{"to" : "3"}, {"effect":"slideOutTop-slideInTop"}],
                            [{"to" : "1"}, {}],
                            [{"to" : "2"}, {}]
                        ],
                        [
                            //3 step:
                            [{"to" : "4"}, {"effect": "zoomOut-zoomIn"}],
                            [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}],
                            [{"to" : "2"}, {}]
                        ],
                        [
                            //4 step
                            [{"to" : "5"}, {"effect": "slideOutBottom-slideInTop"}],
                            [{"to" : "2"}, {}],
                            [{"to" : "3"}, {"effect": "zoomOut-zoomIn"}]
                        ],
                        [
                            //5 step
                            [{"to" : "1"}, {"effect": "slideOutLeft-slideInLeft"}],
                            [{"to" : "1"}, {"effect": "zoomOut-zoomIn"}],
                            [{"to" : "1"}, {"effect": "slideOutRight-slideInRight"}]
                        ]
                    ],
                    total_steps    : 5,
                    speed : 3000
                });
               
                //we want 4 steps/slides for the second banner:
                $('#ca_banner2').banner({
                    steps : [
                        [
                            //1 step:
                            [{"to" : "2"}, {"effect": "slideOutTop-slideInTop"}],
                            [{"to" : "2"}, {"effect": "slideOutTop-slideInTop"}]
                        ],
                        [
                            //2 step:
                            [{"to" : "1"}, {"effect": "slideOutRight-slideInRight"}],
                            [{"to" : "1"}, {"effect": "slideOutLeft-slideInLeft"}],
                        ],
                        [
                            //3 step:
                            [{"to" : "2"}, {"effect": "slideOutLeft-slideInLeft"}],
                            [{"to" : "2"}, {"effect": "slideOutRight-slideInRight"}]
                        ],
                        [
                            //4 step:
                            [{"to" : "1"}, {"effect":"zoomOutRotated-zoomInRotated"}],
                            [{"to" : "1"}, {"effect": "zoomOutRotated-zoomInRotated"}],
                        ]
                    ],
                    total_steps    : 4,
                    speed         : 2000
                });
            });
// ]]></script>

In questo modo in homepage vedo bene il secondo javascript ma quello dello slide non si vede per niente.
« Ultima modifica: 09 Mag 2013, 08:28:27 da ajeje989 »

Offline ajeje989

  • Esploratore
  • **
  • Post: 76
    • Mostra profilo
Re:Problema 2 Javascript
« Risposta #3 il: 09 Mag 2013, 10:10:09 »
 :(

Offline ajeje989

  • Esploratore
  • **
  • Post: 76
    • Mostra profilo
Re:Problema 2 Javascript
« Risposta #4 il: 09 Mag 2013, 12:40:33 »
nessuno sa darmi una mano ?

mau_develop

  • Visitatore
Re:Problema 2 Javascript
« Risposta #5 il: 09 Mag 2013, 13:14:52 »
probabilmente va in conflitto jquery. Hai attivato jquery no conflict?

...poi scusa ma quella che tu chiami ajeje è jquery 1.4 probabilmente lo carica già lo slider e di diversa versione

..manca l'index html nella directory /js
« Ultima modifica: 09 Mag 2013, 13:20:27 da M_W_C »

Offline ajeje989

  • Esploratore
  • **
  • Post: 76
    • Mostra profilo
Re:Problema 2 Javascript
« Risposta #6 il: 09 Mag 2013, 15:30:37 »
Il problema è che non so come si fa..

su javascript non ci ho mai messo mani

 



Web Design Bolzano Kreatif