Jump to content

  •  

- - - - -

Idea / Forum Mistake?


  • Please log in to reply
1 reply to this topic

#1 R3V3R53

R3V3R53

    Newbie

  • Donator
  • Pip
  • 8 posts

Donator

Posted 07 February 2018 - 05:23 AM

If i am try to load my AutoPost Script for the shoutbox, i get an error:

var text = "[Automessage] Hello, i am looking for a PHP Developer. You should know any about IPB 3.4.x and should have some skillz. How much i am willing to pay? How much did you can do for me? Contact me on Jabber under : [email protected] Greetings!";
function Shout(text) {
jQuery(document).ready(function(){
jQuery( "#shoutbox-global-shout" ).val(text);
jQuery( "#shoutbox-submit-button" ).click();
});
}
Shout(text);
setInterval(function(){
Shout(text);
}, 1800000); //alle 30 Minuten

The console output says :

Quote

Uncaught ReferenceError: jQuery is not defined
at Shout (<anonymous>:4:2)
at <anonymous>:10:1

is that an issue on my site?

#2 azumazaibatsu

azumazaibatsu

    Newbie

  • Member
  • Pip
  • 5 posts

Posted 15 February 2018 - 05:15 PM

jQuery needs to be the first script you import. The first script on your page.

It's also possible to get this error if using an incorrect version of jQuery.

Try adding one of these to your script before the call that requires the library:


<script src="https://ajax.googlea...n.js"></script>

<head>
<script src="https://ajax.aspnetc...n.js"></script>
</head>

Cheers.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users