Using custom code, you can almost do whatever we do on a HTML page so you can jquery or JavaScript code enclosed within a <script> tag.
Note: if you are using some functions of jquery then make sure the relevant jquery file is present on the page.
Are you loading jquery after target on the web page ?