tags:

views:

100

answers:

2

Probably error, my jQuery/JS isn't all that. Any ideas how to make this work? Currently it is correctly setting the background colour, but the height remains the same :(

<script type="text/javascript">
$(document).ready(function() {
    var inside_height = $(".inside").height() - 500;
    $(".artists").height(inside_height).css(backgroundColor:"green"});
});
</script>

Thanks!

A: 
<script type="text/javascript">
$(document).ready(function() {
    var inside_height = $(".inside").height() - 500;
    $(".artists").height(inside_height).css("background-color", "green");
});
</script>
Chris Doggett
A: 

I think this Example may Help you!

Js:

 $j(document).ready(function(){
  var inside_height = $(".inside").height() - 500;
  $(".artists").height(inside_height).css({backgroundColor:"green"});
 });

css:

.inside{
    width:100px;
    Height:600px;
    background:#000;
    float:left;
} 
.artists{
    width:100px;
    float:left;
}

html:

<div class="inside"></div>
<div class="artists"></div>
Srikanth