Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery not working anymore since php includes and external file import
    text
    copied!<p>I noticed my jquery code is not working anymore since I started doing some php includes.</p> <p>Obviously, I would like my code to be imported from a js file from the index.php main page. However, my html code will be generated from php includes (i dunno if this could be a problem).</p> <p>Anyway, here is the structure of my php page (index.php) :</p> <pre><code>[...] &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/comments.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;?php // HEADER ----------------------------------------------- include("front/index/header.php"); // ------------------------------------------------------ ?&gt; &lt;div class="containerMiddleFullSize"&gt; &lt;div class="containerMiddle"&gt; &lt;?php // BODY ------------------------------------------------- if ($_GET['page'] == "home") { include("front/index/home.php"); } [...] </code></pre> <p>Here is my jquery code (js/comments.js) :</p> <pre><code>$(function() { $(".content").Watermark("Écrire un commentaire..."); $(".content").focus(function() { $(this).height("50px"); //animate({"height": "50px",}, "fast" ); $(this).next(".button_block").slideDown("fast"); return false; }); $(".cancel").click(function() $(this).parent(".button_block").slideUp("fast").prev(".content").height("18px"); return false; //} }); }); </code></pre> <p>Any help welcome ;)</p> <p>Cheers,</p> <p>Gotye.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload