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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:44:30+00:00 2026-06-10T01:44:30+00:00

how to cut off second sign if there is a second sign ?? some

  • 0

how to cut off second sign if there is a second sign ?? some times id is ….5a and 5b and i need to cut of the ‘a’ and ‘b’

JS

$(".mieszkanie").click(function() {
        var num = this.id.replace(/c_10_0/, "");
        var n = num.length;
        if (n = 2) { 
            [than cut second sign]
        }
        $('.pdf').attr({ 
            href: "img/rzuty/mieszkania/pietro10rzuty/00" + num + ".pdf"
        });
        $('.karta img').attr({ 
            src: "img/rzuty/mieszkania/pietro10rzuty/00" + num + ".png",
            alt: "mieszkanie 00" + num
        });
    });

HTML

<div id="rzuty10p" class="rzuty">
            <span id="c_10_01" class="mieszkanie" title=""></span>
            <span id="c_10_02" class="mieszkanie" title=""></span>
            <span id="c_10_03" class="mieszkanie" title=""></span>
            <span id="c_10_04" class="mieszkanie" title=""></span>
            <span id="c_10_06" class="mieszkanie" title=""></span>
            <span id="c_10_05a" class="mieszkanie" title=""></span>
            <span id="c_10_05b" class="mieszkanie" title=""></span>
        </div>
  • 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-10T01:44:32+00:00Added an answer on June 10, 2026 at 1:44 am

    You can use the substr method to get only the first character:

    var num = this.id.replace(/c_10_0/, "").substr(0, 1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to cut off the time from the datepicker data. when i try
Disclaimer: I am living at some place where my net connection gets cut off
Is there any elegant way to Cut off support for older iOS operating system
How to cut off known substring from the string in sh? For example, I
My suckefish menu on site http://www.lendorlaw.com cut off the right side of my menu.
I want to make sure that no value is cut off in a workbook
I am adding images to a JPanel but the images are getting cut off.
I'm trying to cut a xml into parts and then apply it some transformations.
How to cut part from this string... abb.c.d+de.ee+f.xxx+qaa.+.,,s, ... where i know position by
IN SHORT: I have a method being called at 44,100 times per second. I

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.