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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:38:25+00:00 2026-06-17T05:38:25+00:00

I am building scheduling software. I am using a number of tables to display

  • 0

I am building scheduling software. I am using a number of tables to display times/dates, etc.

In one particular table there are cells with id’s that list the date and employee id number.

I am trying to setup a trading shift system. When the cell is click an ajax function is performed.

Here is an example cell:

<td id="tblcell-2013_03_13-id_3" class="displayShift">$data placed here</td>

Jquery code:

$(document).ready(function () {

  // I can't do this because each id is different
  $("td#tblcell").click(function () {
    alert('it works!');

  });

  // I can't do this because there other other td elements on the same page in other tables
  $("td").click(function () {
    alert('it works!');
  });

});

How do I set up a function that is activated when a specific cell is clicked that also passess var data to the function in a script that has other td table elements that can’t be referenced in this function?

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-06-17T05:38:27+00:00Added an answer on June 17, 2026 at 5:38 am

    You can use the td[id^="tblcell"] selector to select all TDs with their ID starting with tblcell

    $('td[id^="tblcell"]').click(function() {
        // ... do stuff ...
    });
    

    Demo for attribute-value-starts-with selector: http://jsfiddle.net/ARkxD/

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

Sidebar

Related Questions

I am building a scheduling system. The current system is just using excel, and
I am building a reusable framework for building scheduling services using the .NET Framework.
I'm building some software that needs a scheduling input, and I'd really like to
I am building a simple scheduling program for week long scheduling: Sunday - Saturday.
building a site using PHP and MySQL that needs to store a lot of
Building on this answer: https://stackoverflow.com/a/2349824/1382306 Are there further guidelines in A and B's usages,
Building an iOS app that needs to display some HTML string in a UIWebView
Building an Android application using Google's GCM service. I have implemented the onRegistered method
Building on this question , is there a simple solution for having a multi-key
Building with clang++ -std=c++0x -stdlib=libc++ main.cpp #include <string> #include <functional> using std::bind; using std::string;

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.