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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:49:31+00:00 2026-05-13T14:49:31+00:00

A list is created dynamically. Now I want to get 93 or 94 etc

  • 0

A list is created dynamically. Now I want to get 93 or 94 etc which will be used for php function.

For example I added 93 in two ways as you can see below. In li class="93" or href="http://127.0.0.1/ci_backendpro2/index.php/messages/admin/changestatus/93"

Can anyone tell me how to get this number with jquery please?

Thanks in advance.

...
...
<li class="93">
<div class="listbox">
<span class="user"><strong>Administrator</strong></span>
<span class="date">2010-01-28 15:33:53</span>
<a href="http://127.0.0.1/ci_backendpro2/index.php/messages/admin/changestatus/93"
class="todo">to do</a><span class="msg">test</span></div></li>
...

I am working on the following code.

//on todo event. this changes the status to compeleted

$(".todo").live('click', function(event){
event.preventDefault();
// alert("hei");
loading.fadeIn();

});  

This is a follow up question from here. But the question itself is different.

  • 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-13T14:49:31+00:00Added an answer on May 13, 2026 at 2:49 pm

    You can get it from the <li> parent:

    $(".todo").live('click', function(event){
      alert($(this).parent("li").attr("class"));
      loading.fadeIn();
      event.preventDefault();    
    });
    

    Or take it from the href using the attr() function and take a substring:

    $(".todo").live('click', function(event){
      var href = $(this).attr("href");
      alert(href.substring(href.lastIndexOf("/") + 1));
      loading.fadeIn();
      event.preventDefault();    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a unordered list of links, which are dynamically created by Ajax, and
I created dynamic list using android phonegap application.Now I want to add scrollbar for
Im trying to create LinqDataSource that will represent data from dynamically created String list
I have a list of textboxes created dynamically accroding to the user selection on
Is there a way to dynamically create a selectItem list? I dont really want
I have a list of tab items that have views dynamically added to them.
I have a dynamically created list of labels and I am using GestureRecognizer for
I got a bunch dynamically created regressions stored in some list called regressions .
I am attempting to reorder a dynamically created list of CKEditors using the jQuery
Just wondering if it is possible to dynamically create a list of strings in

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.