Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7513503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:12:19+00:00 2026-05-30T00:12:19+00:00

I’m pulling images into a document via json/ajax. After they get pulled in, I’d

  • 0

I’m pulling images into a document via json/ajax. After they get pulled in, I’d like to create a slideshow using the plugin “PhotoSwipe”. All of the code is in my document and I can see that the images get pulled but I think it’s after PhotoSwipe tries to call them. I get the following error:

Code.PhotoSwipe.createInstance: No images to passed.

Then right after that is all the images that have been logged by my function. Here is my code, if anyone can help, it would be much appreciated!

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

          <title></title>

           <link type="text/css" rel="stylesheet" href="styles/iphone.css" /> 
          <link type="text/css" rel="stylesheet" href="styles/slideshow.css" /> 

          <meta name = "viewport" content = "width = 320, user-scalable = no">

              <script type="text/javascript" charset="utf-8" src="scripts/jquery.js"></script>
              <script src="scripts/retina.js" type="text/javascript"></script> 
              <script type="text/javascript" src="scripts/phonegap.js"></script>





            <script type="text/javascript">
                $(document).ready(function() { 
                                  $('img').retina(); 
                                  }); 

                $.ajax({
                       url: "http://www.lcbcchurch.com/mobileJSON/homeslideshow",
                       dataType: "json",
                       success:function(data){
                       results(data);
                       }
                       });

                function results(data) {
                    for(var i = 0; i<data.length;i++){
                        // this will log all of the images url
                        console.log(data[i].slideshow_image); // just access the part you want by it's name.
                        $("#slider").append("<a href='"+data[i].slideshow_image+"'></a>");
                    }
picsReady();
                }
                </script>


            <script type="text/javascript" src="scripts/klass.min.js"></script>
            <script type="text/javascript" src="scripts/code.photoswipe-3.0.4.min.js"></script>


                <script type="text/javascript">
               function picsReady() {
                (function(window, Util, PhotoSwipe){
                 Util.Events.domReady(function(e){
                                      var instance;
                                      instance = PhotoSwipe.attach(
                                            window.document.querySelectorAll('#slider a'),
                                            {
                                            target: window.document.querySelectorAll('#PhotoSwipeTarget')[0],
                                            loop: true,
                                            preventHide: true,
                                            autoStartSlideshow: true,
                                            captionAndToolbarHide: true,
                                            margin: 0,
                                            }
                                            );          
                                      instance.show(0);
                                      }, false);
                 }(window, window.Code.Util, window.Code.PhotoSwipe));
 }
                </script>


            </head>

      <body>
      <div class="wrapper">


    <img src="img/Welcome.png" width="280" height="57" class="retina welcome" />
    <div id="PhotoSwipeTarget"></div>

              <div id="slider">

              </div>

    <p>
    LCBC is a group of people on a journey with Jesus. We don’t claim to have it all figured   out   and recognize that each of us is in a different spot on that journey. From those just     exploring Jesus, to those starting to figure out how to walk with Him, to those fully engaged     in that pursuit— everyone is welcome here!

    </p>    
    </div>

      </body>
    </html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:12:20+00:00Added an answer on May 30, 2026 at 12:12 am

    you might want to check how things are getting fired… from what it looks like your images are loading on an on ready function, but so is the swipe, so the swipe function doesn’t know there are images there since technically its being called at the same time as the images.

    try adding a function that calls the swipe to initiate after your photos have been loaded…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.