+ 1

Fix the error!

Try to click the button , why all these text are coming. Please solve the problem https://code.sololearn.com/WgiC7hIT1j8q/?ref=app

1st Jan 2019, 11:40 AM
Ashwani Kumar
Ashwani Kumar - avatar
4 ответов
+ 5
the bug seems to be from the use of the "*" selector.please select your elements individually or assign a class to them. https://code.sololearn.com/WJyP6m4j9pUV/?ref=app
1st Jan 2019, 1:01 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
Brain , the * symbol select all the element of the document then why the error come?
1st Jan 2019, 2:02 PM
Ashwani Kumar
Ashwani Kumar - avatar
0
use this instead $("body *").css("color", "red") it works by selecting all the element of body tag The error was due to the fact that * includes all the elements of DOM which includes head too.
7th Jan 2019, 5:44 AM
Mayank Dhillon
Mayank Dhillon - avatar