# \[newbie\] Trouble adding script to dynamically change CSS values based on conditions

**URL:** <https://meta.discourse.org/t/newbie-trouble-adding-script-to-dynamically-change-css-values-based-on-conditions/51386>\
**Category:** Support\
**Created:** [10월 11, 2016, 7:48오전 UTC](https://meta.discourse.org/t/newbie-trouble-adding-script-to-dynamically-change-css-values-based-on-conditions/51386 "2016-10-11T07:48:35Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [10월 11, 2016, 6:17오후 UTC](https://meta.discourse.org/t/newbie-trouble-adding-script-to-dynamically-change-css-values-based-on-conditions/51386/5 "2016-10-11T18:17:03Z")

</div>

That isn’t how you’d do it there. To do it there, you’d have to do something like

```plaintext
<script type="text/discourse-plugin" version="0.4">
api.onPageChange((url, title) => {
  alert('test');
});
</script>

```

My original post was from a plugin perspective.

---

_[View the full topic](https://meta.discourse.org/t/newbie-trouble-adding-script-to-dynamically-change-css-values-based-on-conditions/51386)._
