+2 votes
by
Is assigning the value of the format
cont = $('.main')

Need here delete all the div class, for example .main-left.

I tried this variant:
cont = $('.main:not(.main-left)')

and here is an option:
cont = $('.main:not(:has(.main-left))')
but nothing happened.

The crux of the situation is this - there is a JS script that depending on the screen size scales the page content. But I need to throw out some items to this scale did not apply. In this layout they are nested parent div'who initially touches the script. Can be this the problem?

3 Answers

0 votes
by
$(selector).not(selector2);
0 votes
by
I will assume that you have so write
cont = $('.main :not(.main-left)')

And is better throw off the html.
+1 vote
by
$('.main').find('.main-left').remove();

// EDIT

$('.main').not('.main-left');
by
Hanigall : Hm, I thought, to remove need. update the answer.
by
in this embodiment .main-left is no longer displayed at all, and the script stops working, i.e. to scale anything
...