Php ve dış dosya ithalat içerdiğinden jQuery artık çalışmıyor

0 Cevap php

Ben dahil bazı php yapmaya başladığımdan beri benim jquery kod artık çalışmıyor fark ettim.

Açıkçası, benim kod index.php ana sayfasından bir js dosyası ithal istiyorum. Ancak, benim html kodu (bu bir sorun olabilir eğer ben bilmiyorum) php içeren oluşturulur.

Her neyse, burada benim php sayfası (index.php) yapısıdır:

[...]
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/comments.js"></script>
</head>
<body>

<?php
// HEADER -----------------------------------------------
include("front/index/header.php");
// ------------------------------------------------------
?>

<div class="containerMiddleFullSize">
<div class="containerMiddle">

<?php

// BODY -------------------------------------------------
if ($_GET['page'] == "home")
{
    include("front/index/home.php");
}
[...]

İşte benim jquery kodu (js / comments.js) 'dir:

$(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;
//}
});

});

Herhangi bir yardım bekliyoruz ;)

Alkış,

Gotye.

0 Cevap