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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:18:19+00:00 2026-06-04T16:18:19+00:00

I dont have access to the following HTML its displayed dynamically using some External

  • 0

I dont have access to the following HTML its displayed dynamically using some External JS.

<td class="quantitybox">
    <span class="qty">Quantity</span>
    <br style="clear:both;">
    :<input type="text" value="1" onkeydown="javascript:QtyEnabledAddToCart();" maxlength="8" size="3" name="QTY.1121309" class="v65-productdetail-cartqty">
</td>

I want that : after to be Removed/Deleted using Jquery, but i am not getting what handler should be used shall i apply a class to <br> dynamically and do something to 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-04T16:18:23+00:00Added an answer on June 4, 2026 at 4:18 pm

    The jQuery way, without regex:

    $('td.quantitybox').contents().filter(function(){       
        return this.nodeType === 3  && // textNode
               $.trim(this.nodeValue) === ":";
    }).remove();
    

    Or simply change the textnode to an empty string:

    $('td.quantitybox').contents().filter(function(){       
        return this.nodeType === 3  && // textNode
               $.trim(this.nodeValue) === ":";
    })[0].nodeValue = "";
    

    If you have multiple textnode with colons- : that you want to remove:

    $('td.quantitybox').contents().filter(function() {
        return this.nodeType === 3 && // textNode
        $.trim(this.nodeValue) === ":";
    }).each(function() {
        this.nodeValue = "";
    });​
    

    If you want to do it with regex and aware of it’s risks:

    $('td.quantitybox').html(function(i, old){
        return old.replace(/:\s*</, '<');
    });
    

    Note that your HTML code in the question was edited, so I added the white space to the regex so it will work with the initial markup as well….

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

Sidebar

Related Questions

I am dealing with some HTML text that I basically have read access to.
I'm writing an MVC2 app using DataAnnotations. I have a following Model: public class
i dont have microsoft access but would like to open an mdb file, is
Similar question from last night, I don't have access to edit the source HTML
Consider the following code: <html> <head></head> <body> <div id='test' class='blah'> <a href='http://somesite.com/' id='someLink'>click!</a> </div>
lets say i have the following markup: <ul class=editor> <li> <a href=#>Modules</a> <a href=#>View</a>
I have the following code: <div class=sidebar>1</div> <div class=sidebar>2</div> <div class=sidebar>3</div> How do I
I have inherited the following code snippet: <div id=topbox> <h3> <div class=compare_link>Compare Products</div> <input
Using Internet Explorer (don't appear to have an issue in FireFox) the following code
From the page file://localhost/Users/pistacchio/dev/epress/catflow/test_html/index.html I have the following (coffeescript) code trying to access an

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.