+ 1

Why is the error occuring and css background not working?

https://code.sololearn.com/Wbcn18k8SdD2/?ref=app

15th Feb 2018, 3:35 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
11 Antworten
+ 1
1. You have it set to HTML/CSS/JS, rather than setting the editor to jQuery. 2. After you set the editor to "jQuery" and add your HTML code back to the HTML tab, you'll want to correct your jQuery code to use proper syntax (as the error signifies). ERROR: "JavaScript Console Uncaught SyntaxError: Unexpected token . Line: 2" CHANGE: $(function(){ $(.t).click(function(){ $(.list).slideToggle(1000); }); }); TO: $(function(){ $(".t").click(function(){ $(".list").slideToggle(1000); }); }); ^When you're using jQuery, you need quotes around your selector. Use either single '' or double "" quotes around it. Hope that helps.
15th Feb 2018, 3:42 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 1
Open up the editor. Above the code-text area, in the upper-right, there is a box that currently says "HTML/CSS/JS." If you click on that box, it'll give you the other options - select "jQuery."
15th Feb 2018, 4:04 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 1
change span to div
17th Feb 2018, 5:24 AM
meet khurana
meet khurana - avatar
17th Feb 2018, 5:24 AM
meet khurana
meet khurana - avatar
0
How can I set the editor to jquery?
15th Feb 2018, 3:44 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
0
Jakob plz tell me
15th Feb 2018, 3:45 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
0
And why is CSS not working
15th Feb 2018, 3:45 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
0
There is no box like that
15th Feb 2018, 4:15 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
0
There is no box like that
15th Feb 2018, 4:23 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
0
Which box are you telling about
15th Feb 2018, 4:26 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar
0
Jakob tell
16th Feb 2018, 3:41 PM
Soubhagya Ranjan Mishra
Soubhagya Ranjan Mishra - avatar