Question: I have a variable which is the HTML of a UL, I was wondering if I can remove a few things from the variable but not the actual HTML of the UL..?? 

EG 

```
<ol class='sortable'>
    <li class="menu-item">
        <div>Allure</div>
        <ol>
            <li class="menu-item" style="display: list-item;">
                <div><a href="/_webapp_4002836/Allure-Gallery">Energy-Drink</a>      </div>
            </li>
        </ol>
    </li>

    <li class="menu-item disabled">
        <div>Bitten SJP</div>
        <ol>
            <li class="menu-item" style="display: list-item;">
                <div><a href="#">Bitten</a></div>
            </li>
        </ol>
    </li>
</ol>

```

My JQuery does this 

```
var sortableList = $(".sortable").html();

```

is there any way to do this 

```
var sortableList = $(".sortable").html("MINUS ALL CLASSES ".DISABLED");

```

Thanks for any answers

Answer: 
If you're trying to select all of a menu-item that is directly from `.sortable` that isn't disabled:

```
$(".sortable > .menu-item:not(.disabled)")

```
This example separates the html from the dom so you don't manipulate the dom: <http://jsfiddle.net/Rfk6M/1/>

```
var html = $(".sortable").clone().html();
html = $(html).each(function(){
   $(this).removeClass();
}).html();

```

If you want to manipulate the dom use this: 

```
var html = $(".sortable").html();
html = $(html).each(function(){
   $(this).removeClass();
}).html();

```