Skip to content
Permalink
Browse files

Load wp-autocomplete.js from wordpress

  • Loading branch information...
davidnash committed Mar 13, 2019
1 parent 1d52050 commit 738b6cf9e039fb9450f346b591002c46c5a4c165
Showing with 4 additions and 0 deletions.
  1. +1 −0 functions.php
  2. +3 −0 js/wp-autocomplete.js
@@ -2,6 +2,7 @@
function add_theme_scripts() {
wp_enqueue_style('awesomepletecss', get_template_directory_uri() . '/awesomplete/awesomplete.css');
wp_enqueue_script('awesompletejs', get_template_directory_uri() . '/awesomplete/awesomplete.js');
wp_enqueue_script('theme-js', get_template_directory_uri() . '/js/wp-autocomplete.js', ['awesompletejs'] );
}
add_action('wp_enqueue_scripts', 'add_theme_scripts');
@@ -0,0 +1,3 @@
document.addEventListener('DOMContentLoaded', function() {
console.log('wp-autocomplete.js loaded!');
});

0 comments on commit 738b6cf

Please sign in to comment.
You can’t perform that action at this time.