Yes, it works with any type of site.
Since the changes to the page are created at the level of the visitor's browser, it is just based on the HTML served by your site's web host.
All you have to do is place the javascript code on every page. This is very easy to do in WordPress since the code is placed in the header.php and footer.php files of the theme you are using.