<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="ARTICLE @ XOOPS powered by FeedCreator" -->
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="it">
    <title>Xoops Italia :: Articolo</title>
    <tagline>Articolo XML</tagline>
    <link rel="alternate" type="text/html" href="http://www.xoopsitalia.org/modules/article/view.article.php/61/c8"/>
    <id>http://www.xoopsitalia.org/modules/article/view.article.php/61/c8</id>
    <modified>2008-07-06T07:12:33+02:00</modified>
    <author>
        <name>defkon1 at gmail dot com</name>
    </author>
    <generator>ARTICLE @ XOOPS powered by FeedCreator</generator>
    <entry>
        <title>Utilizzare jQuery in Xoops</title>
        <link rel="alternate" type="text/html" href="http://www.xoopsitalia.org/modules/article/view.article.php/61/c8"/>
        <created>2008-01-09T13:57:54+02:00</created>
        <issued>2008-01-09T13:57:54+02:00</issued>
        <modified>2008-01-09T13:57:54+02:00</modified>
        <id>http://www.xoopsitalia.org/modules/article/view.article.php/61/c8</id>
        <author>
            <name>Defkon1</name>
        </author>
        <summary>Categoria: Temi e templates&lt;br /&gt;Sommario: Esiste un'incompatibilità tra jQuery e il codice Javascript di Xoops, ma può essere superata.&lt;i&gt;Traduzione e adattamento dell'articolo inglese &lt;a href=&quot;http://xoops-tips.com/modules/news/article.php?storyid=111&quot; target=&quot;_blank&quot;&gt;&quot;jQuery and Xoops&quot;&lt;/a&gt; di nachenko (&lt;a href=&quot;http://xoops-tips.com&quot; target=&quot;_blank&quot;&gt;XoopsTips.com&lt;/a&gt;)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;E' possibile utilizzare la libreria jQuery in Xoops, ma se provate a seguire le usuali istruzioni di installazione non riuscirete a farla funzionare a dovere su tutti i browser.&lt;br /&gt;&lt;br /&gt;Esiste infatti un'incompatibilità di base tra la libreria e il codice Javascript nativo di Xoops. Vediamo come aggirarla, in modo da poter utilizzare tutte le sue funzionalità nei nostri temi senza doverci preoccupare di nulla.&lt;br /&gt;&lt;br /&gt;1. includete la libreria con un path basato sulla variabile Smarty &lt;{$xoops_url}&gt; e non un path assoluto.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;code&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;script&amp;nbsp;src&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;{$xoops_url}&amp;gt;/jquery/jquery.js&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&amp;lt;/pre&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;2- Non utilizzate la funzione $ per eseguire jQuery. XOOPS possiede la propria funzione $, e dovrete quindi utilizzare la chiamata jQuery originale. &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;code&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;jQuery&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;document&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ready&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;3. includete i file jQuery prima di questa linea nel vostro tema: &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;code&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&amp;lt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$xoops_module_header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;pre&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&lt;/span&gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Tale linea infatti caricherà il file &lt;i&gt;includes/xoops.js&lt;/i&gt;, che contiene la sua versione della funzione $.&lt;br /&gt;</summary>
    </entry>
</feed>
