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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:19:57+00:00 2026-06-14T18:19:57+00:00

I have this checkbox value: 10/07-08/24_NOV , and I have this code: $(window).load(function() {

  • 0

I have this checkbox value: 10/07-08/24_NOV, and I have this code:

$(window).load(function() {
    $('input:checkbox').change(function() { 
    var tot = 100;
    $('input:checkbox:checked').each(function() {
        tot -= parseInt($(this).val());
    });
    $('#outputDiv').html(tot)
});
});

I need jQuery to give me only the first value before the first delimiter, number 10.
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-14T18:19:59+00:00Added an answer on June 14, 2026 at 6:19 pm

    You can use split() function to get the value before first / ,

    Live Demo

    $(this).val().split('/')[0]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this jquery code: <script type='text/javascript'> $(window).load(function(){ $('input:checkbox').change(function(){ var tot=200; $('input:checkbox:checked').each(function(){ dat=$(this).val(); tot-=parseInt(dat);
I have this js code: $(#startSearch).live(click, function(event) { $(input:checkbox[name='searchId']:checked).each(function() { var searchId = $(this).val();
I have this code in my application var checked = $('#fieldset input[type=checkbox]:checked'); var ids=
I have the following code: $(input:checkbox).click(function () { getIndex($(this).attr(value).index(this)); } The value of the
I have the following code: function toggleChecked(status) { $(.checkbox).each( function() { $(this).attr(checked,status); }) }
I have this code: function updateTextArea() { var allVals = []; $('#c_b :checked').each(function() {
I have this code: $('#chkBox').click(function() { $('#hiddenBox').val($('input').is(':checked')); }); I want it to be where
I have this code: facetsString += "<td><input type='checkbox' value=facetList[count].term>&nbsp;&nbsp;" + facetList[count].term + " ("
I have this code in a js file: function buildRolePicker() { var pnl =
Ok, so I have this jquery function to that grabs the checkbox's value and

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.