JQuery selector: Select elements without an iframe as a child -


i want delete elements having iframe child. example, if want delete divs without iframe child:

$("div :not(iframe)").remove(); 

but doesn't work... correct instruction?

thank much!

you can use combination of :not , :has

live demo

$("div:not(:has(iframe))").remove(); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -