removeElement

removeElement ( string code , string cssSelector ) : string

Remove all elements in an HTML code which correspond to cssSelector.

Example


console(removeElement('<div class="title"><h3 class="hello">Hello World</h3></div>', "h3.hello")) //-> <div class="title"></div>

Parameters

code

An HTML code

cssSelector

CSS selector of the element to remove.