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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:21:18+00:00 2026-06-17T00:21:18+00:00

I have a table with a dynamic number of sliders, for which I’d need

  • 0

I have a table with a dynamic number of sliders, for which I’d need to execute some javascript code for each cell of the table, when the page is loaded. Each slider needs a separate $(window).load(function(){... call.

Problem is: I only know the id and parameters at the time the slider is printed to the html, so I cannot add them all in the headers. This ends me up with stuff like

<td>
 <script type="text/javascript">
  $(window).load(function(){$("#my_id").PPSlider({ARGUMENTS});};
 </script>
 <input type="hidden" id="my_id"/>
</td>

Is there a way to replace this with an onload attribute of input? I have tried a dozen ways and they all don’t seem to work. If not, how should this be done properly, given that I cannot incorporate them in the header?

EDIT: clarification: the arguments are different for each slider, they represent text to be shown when the slider is in certain positions.

  • 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-17T00:21:20+00:00Added an answer on June 17, 2026 at 12:21 am

    Give them classes instead – those don’t have to be unique, and this is what they’re made for! Also, you should handle ready instead.

    <input type="hidden" id="my_id" class="slider" />
    
    $(document).ready(function() {
        $('.slider').PPSlider({ARGUMENTS});
    });
    

    Of course, if each slider actually needs its own for some reason (different arguments for each that absolutely can’t be determined using attributes? Unlikely, but…) then you can just put the <script> after the slider element, and then you don’t even have to wait for onload.

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

Sidebar

Related Questions

I have this table with which I create dynamic checkboxes (the number of records
What im doing is I have a dynamic table and creating rows which all
I have two table cells, with dynamic content. Table cell one works fine, when
I have a DDL and Button which when clicked create a dynamic table; all
Fiddle: http://jsfiddle.net/MhWm5/16/ I have some dynamically generated table rows/values with dynamic IDs <td class=control-group>
I have some PHP code that generates dynamic tables of data on the fly.
I have a form in which a table of dynamic data is built with
I have one table which display data as from Dynamic Content in 1 column.
I have a table with and many (dynamic number) rows, and the screen visible
I have a form that has a dynamic number of rows. Each row has

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.