# How and where to include custom JS only for specific pages

**URL:** https://discourse.roots.io/t/how-and-where-to-include-custom-js-only-for-specific-pages/3173
**Category:** sage
**Created:** 2015-03-10T19:04:38Z
**Posts:** 10
**Showing post:** 4 of 10

## Post 4 by @austin — 2015-03-11T05:00:12Z

> [@Foxaii](#):
>
> This means that from that point onwards you need to use the full reference for jQuery - jQuery(‘.selector’) instead of using its shortcut - $(‘.selector’).

Or do dis

```
(function ($) {
  $('.selector').text('you can use the `$` like normal in here');
  $('.button').on('click', function () { 
    alert('yee'); 
  });
})(jQuery);
```

---

_[View the full topic](https://discourse.roots.io/t/how-and-where-to-include-custom-js-only-for-specific-pages/3173)._
