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

  • Home
  • SEARCH
  • 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 6551305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:19:19+00:00 2026-05-25T12:19:19+00:00

I have the following div element <div id=row_1 class=active_page workorders_edit></div> And I want to

  • 0

I have the following div element

<div id="row_1" class="active_page workorders_edit"></div>

And I want to be able to retrieve the class name workorders_edit. In my real case I only have access to the active_page class name

Please check my Fiddle for a better explanation. The end result should populate the id=”classname” with only “workorders_edit” and not “active_page workorders_edit”

Thank you.

  • 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-25T12:19:20+00:00Added an answer on May 25, 2026 at 12:19 pm

    http://jsfiddle.net/genesis/aaAyp/3/

    var classname = $('.active_page').attr('class').split(' ')[1];
    

    Note: only works when active_page class is first in the class attribute, and workorders_edit is the next class in the class attribute… any variation of this will break

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

Sidebar

Related Questions

when I want to remove div element, I have the following code: <div class='text-field'>
I have a page containing the following div element: <div id=myDiv class=myDivClass style=>Some Value</div>
I have the following element in HTML: <div class=window iname=win0> <div class=title prop=title> </div>
I have the following function to remove a DOM element div, $('#emDiv').on(click, ':button[data-emp-del=true]', function
Say I have the following DOM element in my piece of code: <div id=test>
I have the following setup: <div>Element with CSS3 animated height change</div> <div><a href=#>Link</a></div> I
I have the following html: <div id=container> <ul> <li>element 1</li> <li>element 2</li> </ul> </div>
If I have the following DOM elements <div class=item>content1</div> <div class=item>content2</div> how, using jQuery
I have the following div and paragraphs: <div id=container> <p class=jsavoutput jsavscroll readonly=readonly style=width:225px;
I have the following html: <div class=bf_form_row> <label for=findout>Text goes here</label> <textarea class=findOut cols=40

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.