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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:24:19+00:00 2026-05-15T06:24:19+00:00

I have had a bit of a look around and am having some difficulty

  • 0

I have had a bit of a look around and am having some difficulty solving a wee issue I am having.

I basically have a string of HTML, I convert that to a JQuery DOM object so that I can easily remove all elements that have a certain class using JQuery’s .remove(). I.e.,

var radHtml = editor.get_html();

var jqDom = $(radHtml);

$(".thickbox", jqDom).remove();
$(".thickboxcontent", jqDom).remove();

editor.set_html(this.innerHTML);

NOTE: The HTML is derived from content in a RADEditor text editor so there are no parent HTML tags, so can look as follows:

<p>This is a header</p>
<p>this is some content followed by a table </p>
<a href="#TB_inline?height=350&amp;width=400&amp;inlineId=myOnPageContent0" class="thickbox">Test Thickbox</a>
<div id="myOnPageContent0" class="thickboxcontent">
<table class="modal">
    <thead>
    </thead>
    <tbody>
        <tr>
            <td>item</td>
            <td>result</td>
        </tr>
        <tr>
            <td>item 1</td>
            <td>1</td>
        </tr>
        <tr>
            <td>item 2</td>
            <td>2</td>
        </tr>
        <tr>
            <td>item 3</td>
            <td>3</td>
        </tr>
    </tbody>
</table>
</div>

Here is what the jqDom.html() returns from the HTML above:

"This is a header"

I was wondering if there was an easy way to do this – have some html and remove all elements (in this case divs) that have a certain class (but leaving their contents). JQuery doesnt have to used, but I would like to.

Manipulating the DOM object is fine – it is getting the full DOM object in its entirety as a string that I am having the problem with.

Any help would be much appreicated. 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-05-15T06:24:19+00:00Added an answer on May 15, 2026 at 6:24 am
    var radHtml = editor.get_html();
    
    var jqDom = $(radHtml);
    jqDom.wrap('div'); //dont remember if thats ok or u need to asign it in the jqDom again
    $(".thickbox", jqDom).remove();
    $(".thickboxcontent", jqDom).remove();
    
    editor.set_html(jqDom.html());
    

    Maybe that could help

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

Sidebar

Related Questions

I've had a look around and have found example queries where the IF forms
I've done quite a bit of googling on this error but have had no
For years, on 32-bit systems I have never had a problem. Why can't I
I have run into a bit of a problem here: I had a problem-specific
I have the following code setup: http://jsfiddle.net/bABHU/2/ Had to change it a little bit
I have had a look all over, but it doesn't seem as though my
I have had this question niggling at the curious bit of my mind for
I've had a look around & can't see an answer to this, I'm a
I've had a look around the forum and I can't find anything that fits
I've had a good look around but havnt been able to find a solution

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.