I try to set the height of a div equalvalent to its width using .width() but I got an error of
Uncaught SyntaxError: missing ) after argument list
here's my js
$('#myDiv').css('height':($('#myDiv').width()));
you have syntax error in your code.
if you want set one item you can use this:
$('#myDiv').css('height',$('#myDiv').width());
if you want to set multiple item you can use this:
$('#myDiv').css({'height':$('#myDiv').width()});
for more info you can check here
$('#myDiv').width(). Also, the colon in the middle has to be a comma.SyntaxError: missing ) after argument list-- This means you either forgot a)or have too many(s on that line. Cheers