Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 903
J Robz Avatar asked Mar 25 '26 16:03

J Robz


1 Answers

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;
like image 181
Script47 Avatar answered Mar 27 '26 05:03

Script47



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!