This forum is now read-only. Please use our new forums! Go to forums
8/14 why $("div").css("border-radius","10px") instead of $("div").border-radius("10")?
Need help! Here is the code: $(document).ready(function(){ $(“div”).height( “200”); $(“div”).width(“200”); $(“div”).css(“border-radius”,”10px”) }); and I do not understand why to write $(“div”).css(“border-radius”,”10px”) instead of $(“div”).border-radius(“10”) as for .heihgt and .width?
Answer 55ac34f4937676133d0006b8
2 votes
Hello Mak.st,
It probably did not work because jQuery does not have a border-radius function. However it does have a width and height function, which is why “$(“div”).height( “200”);” worked. Not sure how accurate this info is. Good luck!
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency