Ayoub Abid
Ayoub Abid

Reputation: 452

How to hide multiple elements with the hideElements argument in screenshot function of PhantomCSS

How to include more than one element in hideElements argument in screenshot function?

For one element:

phantomcss.screenshot(target, timeOut, "div.page", fileName);

Upvotes: 0

Views: 58

Answers (1)

Artjom B.
Artjom B.

Reputation: 61952

You can use any jQuery selector as seen in the code. jQuery supports the comma operator that you should know from CSS selectors. Example:

phantomcss.screenshot(target, timeOut, "div.page, span.smth, .advertisement", fileName);

If you're unsure, just take a peek in the source code. That's the beauty of open source projects.

Upvotes: 0

Related Questions