J Robz
J Robz

Reputation: 185

Simple Jquery Problems

$(function(){
    var lr-lineheight = $('#sub').height();
    $("#lefty,#righty").css({"line-height":lr-lineheight+'px'});
)}

So I'm not really sure what im doing wrong here, but I'm on a deadline and would like a bit of help. Please give some input.

Upvotes: 3

Views: 64

Answers (1)

Script47
Script47

Reputation: 14530

Variables cannot be declared with a dash in them.

You can use underscores to split variables:

var my_variable = 1;

or you can use camel case:

var myVariable = 1;

Upvotes: 6

Related Questions