+ 7

Serious Jquery Setback,jquery is failing to load on sololearn

For the past 5 days all codes involving jquery have failed to load on my device when i use Sololearn,jquery codes load on codepen.Ive been using it for a over a year and all libraries have always been fine.I tested other libraries like bootstrap,angular,matter.js and they all worked.Except..jquery,at first i thought it was the version i was using but on testing several other versions they all failed.Im working on something that needs jquery,never been this frustrated as a coder

25th Apr 2018, 6:23 PM
᠌᠌Code X
᠌᠌Code X - avatar
6 Réponses
+ 5
Boem Shakalaka Without seeing the source it's hard to tell for sure. One possible explanation: CodePen has a UI that allows you to quickly have jQuery be automatically included in <head>. Because it's an invisible include, if I did this during debugging I could certainly miss an issue with my <script> tag leading to: "works there, doesn't here, pull hair out".
25th Apr 2018, 9:23 PM
Kirk Schafer
Kirk Schafer - avatar
+ 3
i think Boem Shakalaka wants to know how 🇳🇬Brains imported the jquery i write a test code i first had a problem with the import because i copied the line and by copying he add a invisible dot between <script and scr= ... like this <script.scr= ... maybe that was the bug https://code.sololearn.com/WjSM38kY609m/?ref=app
25th Apr 2018, 7:02 PM
Stefanoo
Stefanoo - avatar
+ 2
Boem Shakalaka <script src="https://code.jquery.com/jquery-3.1.1.js"> //your JS code here </script>
25th Apr 2018, 6:45 PM
🐙evil octopus
🐙evil octopus - avatar
+ 2
Stefanoo yes that was exactly what i meant. Your code seems to work fine, with jquery imported ans working. So i guess the import of 🇳🇬Brains is not defined properly, but it is strange it works in codepen well and not in Sololearn then.
25th Apr 2018, 7:21 PM
***
*** - avatar
+ 1
How do you import jquery? :)
25th Apr 2018, 6:28 PM
***
*** - avatar
0
<script src="https://code.jquery.com/jquery-3.1.1.js"></script> use this inside the head tag and then try coding in the body section. It'll work fine and most of all I would recommend to start your jQuery inside:---- $(document).ready(function(){ //your code should be here }); If you're doing this I think it should work fine.
22nd May 2018, 12:15 PM
Suyash