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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:07:21+00:00 2026-05-13T13:07:21+00:00

I am getting a list of checkboxes from a $.get call in JQuery. Is

  • 0

I am getting a list of checkboxes from a $.get call in JQuery. Is there anyway I can attach an onclick function to each of these checkboxes from within the parent page.

e.g. The parent page would contain the following code (maybe errors as I have just wrote it off the top of my head and not tested it)

$(document).ready(function(){
  $(":checkbox").click(function(){
    //do some stuff
  }

  $.get('some-url.html', function(data){
    $('checkbox-holder').html(data);
  });
}

Therefore any results returned from ‘some-url.html’ would automatically have an onclick event

Thanks

  • 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-13T13:07:21+00:00Added an answer on May 13, 2026 at 1:07 pm

    Using $.live() to set this information will cause all dynamically-loaded elements to act in the same manner. Just set this once at the top of your script, and it will do the rest of the work. You don’t need to reference it when you do your Ajax requests or anything.

    $(":checkbox").live("click", function(){
      // what do you want them to do?
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$(document).ready(function() { $('#somebutton').click(function() { $.get('List', function(responseJson) { $.each(responseJson, function(index, item) { var elem=$('<input type=checkbox
I am getting a list of products from my database as a BindingList. I
I am getting from database list of items ordered by descending date. I use
I am getting strange behaviour using the built-in C# List.Sort function with a custom
I need to display the list of names which I am getting from the
How can all checked items from a list can be fetched? I need to
I am getting new_tag from a form text field with self.response.get(new_tag) and selected_tags from
I'm getting some strange behavior in Firefox whenever I put checkboxes inside a list
With the constraint that you can't use jquery, what's the best way to get
I keep getting a 'List does not exist' error whenever I try and use

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.