jQuery is built into WordPress and you can add a jQuery script to your self hosted WordPress website using the built in wp_enqueue_script() function.
- Create a simple jQuery js file and call it 'test.js'.
- Save the js file in your WordPress, theme's 'js' folder on your server.
- Modify the 'functions.php' file in the root directory of your WordPress website to include this line of code: wp_enqueue_script( 'test', get_template_directory_uri() . '/assets/javascripts/test.js', array(), '1.0.0', true);
Test refresh your website and the alert popup should appear.