Just some additional info…my Chrome console detects an error of “Uncaught ReferenceError: jQuery is not defined” on line 70. I tried adding the jQuery library to the header.php file, but that didn’t fix the issue.
Any help is greatly appreciated!
I completely stumped…does anyone have some insight?
See:
http://codex.ww.wp.xz.cn/Using_Javascript
BTW, you should get WP up to date – old versions are a security risk!
Hey WPyogi,
Thanks for the response. I tried implementing the wp_enqueue_script() within the functions.php file, but this did not fix the error.
I also tried installing the plugin you suggested, but this also didn’t fix the issue.
Any other ideas as to why the “Uncaught ReferenceError: jQuery is not defined” on line 70 is occurring?
The exact error that I believe is causing the modal to not work is “Uncaught ReferenceError: jQuery is not defined” on line 70.
The issue is occurring in IE10, Firefox 33.0, and Chrome.
I added the SCRIPT_DEBUG to the wp-config.php file, but it did not fix the error either.
I’m really stumped.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Did you remove that code? Or did you link to the wrong page? Where is the page with this javascript error?
I did remove the code…I’m going to attempt doing this via plugin. Thanks!
It turns out there’s not many reliable Bootstrap modal plugins for WP. Would you mind helping me troubleshoot the problem if I add the code back to the post?
Let me know! Thanks.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Sure but sometimes we can be unavailable to check the code, which can mean leaving the code up there for quite some time
Let me know when a good time is for you, as I don’t want to leave it up for days. Thanks.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Is this your script:
<script type="text/javascript">//<![CDATA[
jQuery(document).ready(function(){
jQuery.get('http://www.jwsuretybonds.com/blog/wp-admin/admin-ajax.php', {
action: 'update_views_ajax',
token: '0160a1448f',
id: 7125 }, function(response){
if ( console && console.log )
console.log(response);
});
});
//]]></script>