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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:37:57+00:00 2026-05-30T07:37:57+00:00

I have the following script in between the head tags on my page: $.ajax({

  • 0

I have the following script in between the head tags on my page:

$.ajax({
  type: "POST",
  url: "my script that gets what I need",
  context: document.body,
  success: function(data){
    //data is now the value that PHP echoed
       phpsaid = data.split('|');
       var size_ind = phpsaid.length/6;
       var size_per = 6;
       for (var i_one =0; i_one<size_ind; i_one++){
          for(var i_two =0; i_two<1; i_two++){
              if(i_one == 0 ){
                  var i_get = 0
              }
              else{
                  var i_get = i_one * 6;
              }
            $("#big_container").append("<div class ='neato'><div class ='c1'>"+phpsaid[i_get]+"</div><div class ='c2'>"+phpsaid[i_get+1]+"</div><div class ='c3'>"+phpsaid[i_get+2]+"</div><div class ='c4'>"+phpsaid[i_get+3]+"</div><div class ='c5'>"+phpsaid[i_get+4]+"</div></div>")           

          }
       }       
  }
});

Then in the main body I have:

<div id ="big_container">

</div>

The ajax script above is generating the divs to go inside big_container. The client has specified that it be done strictly in that way (meaning generate all divs with ajax on the fly), so conceptual arguments of different ways to tackle it unfortunately won’t help much here.

Here is my problem:

I also want to apply the following plugin to all elements of big_container. This of course works perfectly when I hard code the div elements into the page, but I cannot get it to work on the ajax generated divs within #big_container.

$(function(){
  $('#big_container').bxSlider({
    mode: 'vertical',
    ticker: true,
    tickerSpeed: 4500,
    displaySlideQty: 5
  });
}); 

How do I get the plugin function to apply to the ajax generated div’s once they have in fact been generated?

  • 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-30T07:37:59+00:00Added an answer on May 30, 2026 at 7:37 am

    Insert your initialization code after $("#big_container").append("...");

    It will look like

    $("#big_container").append("<div class ='neato'>..and so on..");
               }
       } // the end of the 'for' loops
    $("#big_container").bxSlider({
                         mode: 'vertical',
                         ticker: true,
                         tickerSpeed: 4500,
                         displaySlideQty: 5
                       });
    

    If you call ajax again on the page and add a new content to the existing one then it is better to write the call of the bxSlider as

    $("#big_container .neato:last").bxSlider({
                         mode: 'vertical',
                         ticker: true,
                         tickerSpeed: 4500,
                         displaySlideQty: 5
                       });
    

    just after .append part

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

Sidebar

Related Questions

I have the following script tags in the <head> so that they don't prompt
I currently have the following script using CSS Sprites that toggles between active and
I have the following script that I need to adapt to read from a
I have the following code snippet in my page. <script type=text/javascript> function expandCollapse(id){ var
I have following script that executes all the .reg files in the current directory.
I have the following script which appears multiple times on my page. I have
I have the following script that works well in Firefox and Chrome (not sure
I have the following HTML code: <ul id='item-list'></ul> <button id='add-item'>Add Item</button> <script type='text/template' id='item-template'>
I have the following javascript code: <script type=text/javascript> //javascript starts var patt=/[<](\S+).*>(.*)<\/\1>/; var str='<a
I have following small script to preview some text before submitting it to store

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.