0

I wonder if anyne can help with this jQuery issue...

I am trying to set the height of a div layer on my site.

I am using this command

var test_height = 200;
$("div#wrapper-holder").height(test_height);

...but nothing seems to be happening. What am I doing wrong??

The page in context is here: http://bit.ly/1ar6KuR

Many thanks for any help that you can give...

user2761030
  • 1,385
  • 2
  • 20
  • 33

2 Answers2

3

wrapper-holder is class not id.

i checked it in your site

class is used as add . before class name

 .wrapper-holder
 ^

you code

var test_height = 200;
$("div.wrapper-holder").height(test_height);
  ^ //changed #(id-selector) to .(class-selector)
Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
0

You were using an ID selector (#selector) on a class element.

<div class="wrapper-holder"> has either to be changed to <div id="wrapper-holder">

Or

var test_height = 200;
$("div#wrapper-holder").height(test_height);

has to be changed to

var test_height = 200;
$("div.wrapper-holder").height(test_height);

See the related Stack Overflow threads on DIV ID vs DIV Class: Difference between div id and div class

Community
  • 1
  • 1
Thew
  • 15,789
  • 18
  • 59
  • 100