I have a slider that load all of my content at once. Into a div. Like so:

external page.php

$get_users = mysql_query("SELECT * FROM user WHERE id!='$user_id'"); 
while ($rows = mysql_fetch_assoc($get_users)) {
$id = $rows['id'];
$firstname = $rows['firstname'];

$display_info .= '
<div class="f_outer" id="' . $id . '">
    <div class="f_name likeu">' . $firstname . '</div>
    echo $display_info;

I call this page from my find.php page using bxslider

Here is my find.php page below.

    <script type="text/javascript">
    $(function() {
    var slider = $("#slider1").bxSlider();
    $("#slider-like").live('click', function() {
        return false;

    <div id="slider-like>Yes</div>
    <div id="slider1">
    include ("external.php");

So what I get is all of my .f_outer div on the find.php page. I have hundreds of user and they will all be loaded at once. I would like to only load one slide at a time. So when I click #slider-like it load one of my dive from my external page.

5 Years
Discussion Span
Last Post by pritaeas

I have a demo on my website that uses two. One to show the current, and the other to preload the next. Take what you need. If you have questions, let me know here. You should make an improvement, since I am using a Javascript array. You should use AJAX to get the next, but am sure this will get you started.

Edited by pritaeas

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.