jquerywijgrid

Remove Element with multiple Class without ID


Been Googling and couldn't find the answer. How do I go about removing THIS specific div and child after that, without an id (it was generated by WijGrid)

<div class="wijmo-wijsuperpanel-vbar-buttontop ui-state-default ui-corner-tr">
    <span class="ui-icon ui-icon-triangle-1-n"></span>
</div>

I tried, but no go

$('.wijmo-wijsuperpanel-vbar-buttontop .ui-state-default .ui-corner-tr').remove();

Thanks in advance!


Solution

  • Just remove the spaces in your selector:

    $('.wijmo-wijsuperpanel-vbar-buttontop.ui-state-default.ui-corner-tr').remove();
    

    With the spaces, it would select elements with ui-corner-tr class inside an element with ui-state-default class inside an element with wijmo-wijsuperpanel-vbar-buttontop class.