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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:51:28+00:00 2026-06-09T02:51:28+00:00

<span class=here one-two-sdfs test>click1</span> <br /> <span class=here one-two-3er te3st>click2</span> <br /> <span class=here

  • 0
<span class="here one-two-sdfs test">click1</span> <br />
<span class="here one-two-3er te3st">click2</span> <br />
<span class="here one-two-sdwrer test">click3</span> <br />
<span class="here one-two-s-ere test">click4</span> <br />
<span class="here one-two-wer-r test">click5</span> <br />
<span class="here one-two test">click6</span> <br />

$('.here').click(function(){
    var one-two = ????
    alert(one-two);
    })​

​
fiddle

i would like –

if i click on click1 then alert show me one-two-sdfs

if i click on click2 then alert show me one-two-3er

if i click on click3 then alert show me one-two-sdwrer

if i click on click4 then alert show me one-two-s-ere

if i click on click5 then alert show me one-two-wer-r

if i click on click6 then alert show me one-two

i would like show class with begin one-two-
how can i make it?:)

  • 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-09T02:51:30+00:00Added an answer on June 9, 2026 at 2:51 am

    http://jsfiddle.net/tMzAH/10/

    $('.here').click(function(){
        var onetwo = this.className.match(/\bone-two[^\s]*/);
        console.log(onetwo[0]);
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html: <li> <span class=one>Stuff here</span> <span class=two>More stuff</span> </li> .one
I have the following two functions. One checks for a class and if none
I have a function in javascript that changes a span class when I click
Let's say I do something stupid like this: <div class=my_class>fun wee!!</div> <span class=my_class><b class=my_class>Title</b></span>
I want to add a class to multiple span elements with common classname's based
I have a span that is generated through javascript, with its css class as
I want to check if a particular class is applied to a span inside
Lets assume I have several <span class='remove-type'> elements on a page. In jQuery document.ready
I have a div with a span <div id=div1> <span class=>hello</span> </div> When i
For edit home status of category I have a link: <span class=\ha\ title=\Active 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.