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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:44:34+00:00 2026-06-04T07:44:34+00:00

I am learning jquery and would like to learn how to convert this server

  • 0

I am learning jquery and would like to learn how to convert this server side code to jquery function. Any help is appreciated.

Protected Sub ChartstoDisplay_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles ChartstoDisplay.SelectedIndexChanged
    For i As Integer = 0 To ChartstoDisplay.Items.Count - 1
        If ChartstoDisplay.Items(i).Selected Then
            ChartstoDisplay.Items(i).Attributes.Add("style", "color:DarkGreen;")
        Else
            ChartstoDisplay.Items(i).Attributes.Add("style", """")
        End If
    Next
End Sub

I’ve tried this to no avail.

function checkboxSelection() {          
    foreach (ListItem li in ChartstoDisplay.Items)
    {
        li.Attributes["class"] = "checkBoxListItems";
    }
    $('#ChartstoDisplayAll').click(function() {
    $(".checkBoxListItems").each(
        function(intIndex) {
            if ($(this).find('input').attr('checked') === true)
                    $(this).attr.add("style","color:DarkGreen;");
        });
    });
}
  • 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-04T07:44:36+00:00Added an answer on June 4, 2026 at 7:44 am

    with help from here and others here is the solution

    $(document).ready(function () {
          $('#ChartstoDisplayAll').change(
              function () {
                  if ($('#ChartstoDisplayAll').is(':checked')) {
                      $(this).next().addClass("selected");
                      $('#buttons').addClass("buttonsshow").removeClass('buttonshide');
                      $("#cbxArea input[type=checkbox]").each(function () {
                          $(this).prop("checked", true);
                          $(this).siblings("label").toggleClass("selected");
                      });
                  } else {
                      $('#buttons').addClass("buttonshide").removeClass('buttonsshow');
                      $(this).next().removeClass("selected");
                      $("#cbxArea input[type=checkbox]").each(function () {
                          $(this).prop("checked", false);
                          $(this).siblings("label").removeClass("selected");
                      });
                  }
              });
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning jQuery-UI, and would like to put together a good looking page, so
I've just started learning jQuery/javascript, so this might seem like a really basic question,
In my learning I have always learnt and understood callbacks in jQuery like this:
Learning Jquery here and I would like to show my SQL table on my
I'm learning JQuery and have found the factory function $() with its selectors quite
I am learning jQuery UI. I downloaded a code in which the author made
I would like to learn how to do fade, and similar effects on JavaScript.
I'm in the process of learning ExtJS after using JQuery for years. I like
I am building a movie app for my self learning and would like to
I'm using this plugin http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ and it works awesome!! but I'd like to make

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.