このための jquery コードはどこで入手できますか? 私は画像を含むデータベースを持っています。このような jquery を自分の Web サイトに出力したいです。
そのように出力するスライダーを作ります
それは私にその出力を与えるスライドを私に与えます私はすでにデータベースと機能しているphpコードを持っています
これは行方不明者のためのオーストラリア政府であり、私たちのサイトはこのようなものです。このようなjqueryが必要ですが、それを行うための元のコードがありません
行方不明者オーストラリアは以下のリンクです。リンクの投稿規則に違反しているため、ここにリンクを投稿することはできません :D
試した
検索、div、テーブルからjqueryを出力する基本的なjqueryは、jqueryの高度なコマンドを知りません
このリンクを試してみましたが、唯一の問題はデータのwhileループです
カルーセルを編集しました。問題は、どのように配置するかです。
> <?php
> include_once('includes/dbConnect.php');
>
>
> ?>
> <?php
>
> $query=mysql_query("select * from persons order by rand()");
>
> while($test = mysql_fetch_array($query)) {
>
> }
>
>
> ?>
> [
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='banner_bike.jpg' alt='Bike'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='banner_paint.jpg' alt='Paint'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='banner_bike.jpg' alt='Bike'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='banner_paint.jpg' alt='Paint'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='banner_bike.jpg' alt='Bike'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='banner_paint.jpg' alt='Paint'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='Penguins.jpg' alt='Tunnel'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> },
> {
> "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='Penguins.jpg' alt='Tunnel'></a><a
> class='caption' href='#'>Sample Carousel Pic Goes Here And The Best
> Part is that...</a></div>",
> "content_button": "<div class='thumb'><img src='f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place
> Holder</p>"
> }
>
> ]
これが私の画像と名前のクエリです
> $query=mysql_query("select * from persons order by date desc LIMIT
> 0,10 ");
>
> > <img height=200 width=200 src=' upload/". $test['Image'] ."'/> <a href
> > ='profile.php?PersonID=$id'> ".$test['LastName'].", ". $test['FirstName']." ". $test['MiddleName']."</a>
検索にこのwhileループを使用していますが、正しく呼び出されます。
ここにjsonコードがあります
> <script>
>
> $.getJSON("agile_carousel_data.php", function (data) {
>
> $("#multiple_slides_visible").agile_carousel({
> carousel_data: data,
> carousel_outer_height: 230,
> carousel_height : 200,
> slide_height : 200,
> carousel_outer_width : 480,
> slide_width : 260,
> number_slides_visible: 3,
> transition_time : 330,
> control_set_1: "previous_button,next_button",
> control_set_2: "group_numbered_buttons",
> persistent_content: "<p class='persistent_content'>Agile Carousel Example: Multiple Slides Visible</p>"
> });
>
> })
>
> </script>
これは、data.php の $data の内容です
> `<?php include_once('includes/dbConnect.php'); $data = array(); while
> ($test = mysql_fetch_array($query)) { $data[]['content'] = "<div
> class='slide_inner'><a class='photo_link' href='#'><img class='photo'
> src='{$test['image']}' alt='Bike'></a><a class='caption'
> href='#'>Sample Carousel Pic Goes Here And The Best Part is
> that...</a></div>" $data[]['content_button'] = "<div
> class='thumb'><img src='{$test['thumb']}' alt='bike is
> nice'></div><p>Agile Carousel Place Holder</p>" } echo
> json_encode($data); ?> `
上記のコードでは、データベース接続を含めても何も得られませんが、何も出力されません。元の Web サイトへのリンクを再び示します。