1

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!

sgkdnay
  • 327
  • 1
  • 4
  • 17

2 Answers2

5

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.

Ja͢ck
  • 170,779
  • 38
  • 263
  • 309
3

Remove whitespaces, otherwise you're asking for descendents and not elements containing ALL classes.

$('.wijmo-wijsuperpanel-vbar-buttontop.ui-state-default.ui-corner-tr').remove();
Claudio Redi
  • 67,454
  • 15
  • 130
  • 155