I’m including the following in footer file of my vantage child theme,
$.ajax({
url: ‘//munchkin.marketo.net/munchkin.js’,
dataType: ‘script’,
cache: true,
success: function() {
Munchkin.init(‘My_Code_…’);
}
});
which produces the following error:
Uncaught TypeError: Cannot read property ‘ajax’ of undefined(index):582 (anonymous function)
Any suggestions as to what I’m doing wrong?
Hi Chris
To avoid possible conflicts, WordPress doesn’t have the jQuery $ variable in the global scope. So you’ll need to use the `jQuery` global instead. Something like this:
Thanks, man!
Any time :)