Bonjour,

Je voudrais afficher mes image dans la div zone que j'ai préparer pour cela. Je les récupéré avec ajax.
Ensuite je voudrais les afficher dans la zone ces image.
Mais malheureusement il ne s'affiche pas. Je ne vois pas d’où vient l'erreur.
voici le code .js
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
 
$(document).ready(function(){ 
 
    $(".repImage a").click(function(){ 
        openLight(); 
        var titre = $(".repImage").text(); 
        $.ajax({ 
            url: 'Script/Php/Photo.php', 
            type:'POST', 
            dataType:'html', 
            complete: function(resultat, status) { 
                console.log(resultat); 
            }, 
            success: function(codehtml, status) { 
                console.log(codehtml); 
                $(codehtml).find("#slideShow").appendTo("#zone"); 
            }, 
            error: function(resultat, status, err) { 
                console.log(err); 
            } 
        }); 
        slideShow();  
 
        function slideShow(){ 
               /*$("#slideShow").css("position","relative"); 
            $("#slideShow img").css("position","absolute");*/ 
            $("#slideShow img:gt(0)").hide(); 
 
            // Ajout des liens 
            $("#slideShow").append("<p><a href=\"#\" class=\"prev\">Précédente</a> | <a href=\"#\" class=\"next\">Suivante</a></p>"); 
            $("#slideShow p").css("padding-top","340px"); 
 
            // Clic sur le lien suivant 
            $("#slideShow a.next").click(function() { 
                var $img_suivante = $("#slideShow img:visible").next("img"); 
                if($img_suivante.length<1) $img_suivante = $("#slideShow img:first"); 
                $("#slideShow img:visible").fadeOut(); 
                $img_suivante.fadeIn(); 
            }); 
 
            // Clic sur le lien précédent 
            $("#slideShow a.prev").click(function() { 
                var $img_precedente = $("#slideShow img:visible").prev("img"); 
                if($img_precedente.length<1) $img_precedente = $("#slideShow img:last"); 
                $("#slideShow img:visible").fadeOut(); 
                $img_precedente.fadeIn();     
            }); 
        } 
        function openLight() { 
            $("body").append("<div id=\"zone\"></div>");  
            $("body").prepend("<div id=\"cache\"></div>");    
            $("#cache").css({ 
                "width":"100%", 
                "height":"100%", 
                "background":"black", 
                "z-index":"10", 
                "position":"absolute", 
                "top":"0", 
                "left":"0", 
                "opacity":0.5 
            }); 
            $("#zone").css({ 
                "width":"800px", 
                "height":"630px", 
                "background":"white", 
                "z-index":"20", 
                "position":"absolute", 
                "top":"50%", 
                "left":"50%",  
                "padding":"10px", 
                "margin-left":"-400px", 
                "margin-top":"-301px" 
            }); 
        } 
 
        function closeLight(){ 
            $("#slideShow img").remove(); 
            $("#zone,#cache").remove(); 
        } 
    }); 
});
et voici le code php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
$sql = new RequestSql(Singleton::getInstance()); 
$tabImages = $sql->getImages(1); 
echo"<div id='slideShow'>"; 
foreach ($tabImages as $row) { 
    echo"<img src='".$row[2]."' alt='".$row[1]."' title='".$row[1]."'>"; 
} 
echo"</div>";
dans la console je remarque que le code php fonctionne et j'arrive a récupérer toute les images se trouvant dans la div slideShow.
Par contre je 'arrive pas a les insérer dans la div zone


Je vous remercie par avance e toute l'aide que vous pourrez m'apporter

Di Blasio Michael