Home › Forum › Problemi Vari con WP › Problema tabs in jquery
-
AutorePost
-
-
7 Maggio 2011 alle 23:08 #17790bacoPartecipante
Salve ragazzi, vorrei usare queste tab nel mio sito:
http://www.sunsean.com/idTabs/
Ma non riesco a farle funzionare, non capisco dove sbaglio. Per ora ho fatto cosà¬:
1- Nell’header del sito prima di <?php wp_head(); ?> ho inserito:
<?php wp_enqueue_script(‘idtabs’, get_bloginfo(“template_url”) . ‘/js/jquery.idTabs.min.js’, array(‘jquery’)); ?>
2-Ho creato una cartella Js nella directory principale del tema e ho creato il file jquery.idTabs.min.js con blocco note incollandoci dentro il codice che sul sito è accessibile cliccando su download
3-In una pagina incollo il codice presente dopo “See below for a better example.”
Non so dove sbaglio, spero qualcuno possa aiutarmi in quanto preferirei crearmi le tab da me invece di usare un plug in (ne ho provati molti ma senza fortuna per ora).
-
8 Maggio 2011 alle 8:17 #84288bacoPartecipante
Salve ragazzi, stamattina ho provato un altro tutorial.
http://gobilum.ddcomics.it/2010/10/tab-jquery-cosi-utile-e-cosi-cool-parte1/
-Ho seguito l’url del file jquery e tutto il codice che ho ottenuto l’ho incollato in un file blocco note rinominato jquery.tools.min.js. Il file l’ho inserito nella cartella Js creata da me nel folder principale del tema (C:wampwwwlocalhosy.comwp-contentthemestwentyten)
-nell’header ho inserito
<?php wp_enqueue_script(‘jquery’); ?>
<script type=”text/javascript” src=”js/jquery.tools.min.js”></script>
-scrivo la parte html in un articolo qualunque
-incollo nel file style.css la parte finale del tutorial.
Ottengo questo:
http://img830.imageshack.us/img830/9813/immaginebaf.jpg
Le tab non sono cliccabili, ed il contenuto come vedete non è visibile.
Dove sbaglio secondo voi? Mi sembra di essere ad un passo dalla soluzione ma non riesco a trovarla.
ps. prima di scaricare il file jquery avevo provato anche con il suo <script src=”http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js”></script>, ma ottengo lo stesso identico risultato
-
8 Maggio 2011 alle 10:51 #84290bacoPartecipante
Salve ragazzi mi dispiace fare un terzo post ma non vedo più il link modifica, immagino si possa modificare un post solo dopo tot minuti.
Sono riuscito finalmente a creare una area di test per il mio sito (e di questo ne sono molto felice ) se qualcuno avesse un po’ di tempo per darmi una mano è raggiungibile cliccando sul mio nick.
Al momento nell’area test è applicato quanto detto nel secondo post.
Buona domenica
-
8 Maggio 2011 alle 11:18 #84291zhenyaPartecipante
Nell’header del sito prima di
<?php wp_head(); ?>
ho inserito:<?php wp_enqueue_script('idtabs', get_bloginfo("template_url")
Non so dove sbaglio
Non ho tempo per verificare il resto, ma stai certo che
get_bloginfo("template_url")
con quei doppi apici non funzionerebbe a nessuno.. -
8 Maggio 2011 alle 12:17 #84294bacoPartecipante
Ciao grazie per l’interessamento. Ora sto seguendo quanto detto nel secondo post, purtroppo non riesco (non credo si possa) ad editare il primo post, e non ho più quei doppi apici errati.
-
8 Maggio 2011 alle 12:45 #84295EmmePartecipante
Hai provato, più semplicemente, con <?php bloginfo(‘siteurl’); ?>/wp-content/EtcEtc/jquery.idTabs.min.js ?
-
8 Maggio 2011 alle 13:44 #84298bacoPartecipante
Ciao ho provato a sostituire
<script type=”text/javascript” src=”/js/jquery.tools.min.js”></script>
con
<script type=”text/javascript” src=”<?php bloginfo(‘siteurl’); ?>/js/jquery.idTabs.min.js”></script>
Però senza successo.
Ho notato che nell’header in alto vi è la seguente stringa:
<script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/script.js”></script>
Ho provato allora a scrivere
<script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/jquery.idTabs.min.js”></script> mettendo il file jquery nella directory principale del tema, cosଠcome
<script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/js/jquery.idTabs.min.js”></script>
Però anche qui senza successo…
Da come sembra quindi è un problema dell’indirizzare il tema al file jquery?
-
9 Maggio 2011 alle 8:32 #84307bacoPartecipante
Oggi ho provato un altro tutorial (in locale): http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/
Però ottengo lo stesso risultato, le tab son tutte bloccate.
Ho provato ad aggiungere il loro testo jquery al file .js incluso nel template. E’ questa una procedura corretta?
Però il risultato non è cambiato:(
Avevo sempre aggiunto ovviamente <?php wp_enqueue_script(‘jquery’); ?>, cosଠcome ho provato senza.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.