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 9200283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:43:53+00:00 2026-06-17T22:43:53+00:00

I have this code successfully pulling images from Behance using Jquery Json: $(‘a.link’).live(‘click’, function

  • 0

I have this code successfully pulling images from Behance using Jquery Json:

$('a.link').live('click', function () {
    h = window.location.hash.replace('#', '');
    $.getJSON("http://www.behance.net/v2/projects/" + h + "?api_key=" + api + "&callback=?", function (data) {
        var project_data = "";
        for (var i = 0; i < data.project.modules.length; i++) {
            if (data.project.modules[i].type == "image") { 
                project_data += '<img src="' + data.project.modules[i].src + '" />';
            }
            if (data.project.modules[i].type == "text") {
                project_data += '<p>' + data.project.modules[i].text + '</p>';
            }
        };

        $('.portfolio-details h3').html(data.project.name);
        $('.portfolio-details div').html(project_data);
        $('.portfolio-details').fadeIn(6000);

    });
});

they are pulling into the page, and currently showing as individual images. But how would I wrap all the images together in this code to make a slideshow? each image text represents where the image needs to be added

<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item"> each image </div>
<div class="item"> each image </div>
</div>
</div>
  • 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-06-17T22:43:55+00:00Added an answer on June 17, 2026 at 10:43 pm

    Why can’t you prepend/append the html you need to the var project_data = ""; variable?

    var project_data = '<div id="myCarousel" class="carousel slide"><div class="carousel-inner">';
    
    // Loop goes here...
    project_data += '<div class="item"><img src="' + data.project.modules[i].src + '"> </div>';
    // more code here
    // end of loop
    
    project_data += '</div></div>';
    

    EDIT:
    Here is a simple way to approach this.

    (function($) {
        var user = 'userNameGoesHere',
        api = 'apiKeyGoesHere', 
        project_str = "", 
        i = 0;
    
        var project_images, carousel;
    
        for(i; i <= 3; i += 1) {
            $.getJSON("http://www.behance.net/v2/users/" + user + "/projects?api_key=" + api + "&callback=?&page=" + i, function (data) {
                if ($.type(data.projects) === 'array') {
                    $.each(data.projects, function(i, obj) {
                        project_str += '<a class="tips more-info link" data-placement="bottom" href="#' + obj.id + '">';
                            project_str += '<div class="span3 portfolioitem">';
                                project_str += '<img src="' + obj.covers['404'] + '">';
                                project_str += '<div class="portfolioitem-hoverinfo"> <h3>' + obj.name + '</h3> </div>';
                            project_str += '</div>';
                        project_str += '</a>';
                    });
                }
    
                $('#portfolio-items').append(project_str);
            });
        }
    
    
        $('a.link').live('click', function () {
            var h = window.location.hash.replace('#', '');
    
            $.getJSON("http://www.behance.net/v2/projects/" + h + "?api_key=" + api + "&callback=?", function (data) {
                var project_data = "";
    
                // "data.project.modules" here throws an error on the first click... not sure why
                for (var i = 0; i < data.project.modules.length; i++) {
                    if (data.project.modules[i].type == "image") { 
                        project_data += '<img src="' + data.project.modules[i].src + '">';
                    }
    
                    if (data.project.modules[i].type == "text") {
                        project_data += '<p>' + data.project.modules[i].text + '</p>';
                    }
                }
    
                $('.portfolio-details h3').html(data.project.name);
                $('.portfolio-details div').html(project_data);
                $('.portfolio-details').fadeIn(6000);
    
                project_images = $('.portfolio-details').find('img');
                carousel = '<div id="myCarousel" class="carousel slide"> <div class="carousel-inner">';
    
                $.each(project_images, function(i, img) {
                    carousel += '<div class="item"> <img src="' + img.src + '"> </div>';
                });
    
                carousel += "</div></div>";
    
                // Do something with the carousel - append somewhere or something
                $(document.body).prepend(carousel);
            });
        });
    }(jQuery));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code. I can receive data from my client successfully, but only
I have this code: ie1.link(:text, /Exception:/) It is producing an error message which I
I have this code: con.Open(); cmd = new MySqlCommand(String.Format(SELECT concat(name,'|',lastname) FROM {0} WHERE ID=
I have this code: class LFSeq: # lazy infinite sequence with new elements from
I have this code, and I login successfully: require 'mechanize' require 'logger' agent =
I have this code that writes successfully a file: ofstream outfile (path); outfile.write(buffer,size); outfile.flush();
I have this code in my javascript view model using Knockout. Everything works as
I have this code which successfully makes an HTTP request: //Successful request var requestInBytes
I have this code : <a href=javascript:document.forms['form1'].student_pic.click()> <img src=images/mypic.png alt= width=161 height=29 border=0 style=margin-top:10px
I have this code here please, which permits me to import data from a

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.