Question: So I found this effect and I'm trying to modify it to be loaded inside a DIV `myeffect`, for example:

```
<html>
    <head></head>
    <body>
        <div class="myeffect"></div>
    </body>
</html>

```

I tried changing some variables but I'm not a JavaScript expert and I can't get it to work inside a DIC. The effect covers the whole screen from top to bottom.

The code is on Codepen and can be found here: <https://codepen.io/emilykarp/pen/bVqxRm>

Help is welcome.

Answer: 
Hope this helps

```js
var speeds = [];
var count = 1;
var colors = ['#bf1e2e', '#ee4037', '#dc5323', '#e1861b', '#e1921e', '#f7ac40', '#f7e930', '#d1da22', '#8bc43f', '#38b349', '#008d42', '#006738', '#29b473', '#00a69c', '#26a9e1', '#1a75bb', '#2a388f', '#262161', '#652d90', '#8e2792', '#9e1f64', '#d91c5c', '#ed297b', '#d91c5c', '#db1e5e', '#bf1e2e', '#f6931e', '#f05a28', '#f6931e', '#fbaf41']
var width = parseInt($('html').css('width'), 10);

var random = function(mult, add) {
  return Math.floor((Math.random()*mult) + add);
}; 

var drop = function(n, height, color) {
  $('.myeffect').append('<div class="drop" style="left:'+
                   n*15+'px;height:'+
                   height+'vh;background-color:'+
                   color+';"></div>');
};

var createDrops = function(space) {
  for (var i=speeds.length; i < space/10; i++) {
    speeds.push(random(3000, 2000));
    drop(i, random(70, 30), colors[count]);

    if (count < colors.length-1) { count++; }
    else { count = 0; }  
  }
};

var animateDrops = function(startingN) {
  for (var i=startingN; i<speeds.length; i++) { 
    $('.drop:nth-child('+i+')').slideDown(speeds[i]); 
  }
};

createDrops(width);
animateDrops(0);
```

```css
.drop {
  width: 16px;
  height: 200px;
  display: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  position: absolute;
  top: 0;
  -webkit-box-shadow: inset -4px -8px 16px -6px rgba(0,0,0,0.47);
  -moz-box-shadow: inset -4px -8px 16px -6px rgba(0,0,0,0.47);
  box-shadow: inset -4px -8px 16px -6px rgba(0,0,0,0.47);
}
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="myeffect" ></div>
```
This actually works for me now.

```
var speeds = [];
var count = 1;
var colors = ['#bf1e2e', '#ee4037', '#dc5323', '#e1861b', '#e1921e', 
'#f7ac40', '#f7e930', '#d1da22', '#8bc43f', '#38b349', '#008d42', '#006738', 
'#29b473', '#00a69c', '#26a9e1', '#1a75bb', '#2a388f', '#262161', '#652d90', 
'#8e2792', '#9e1f64', '#d91c5c', '#ed297b', '#d91c5c', '#db1e5e', '#bf1e2e', 
'#f6931e', '#f05a28', '#f6931e', '#fbaf41']
var width = parseInt($('.myeffect').css('width'), 10);

var random = function(mult, add) {
return Math.floor((Math.random()*mult) + add);
}; 

var drop = function(n, height, color) {
$('.myeffect').append('<div class="drop" style="left:'+
               n*60+'px;height:'+
               height+'vh;background-color:'+
               color+';"></div>');
};
var createDrops = function(space) {
 for (var i=speeds.length; i < space/60 + 2; i++) {
 speeds.push(random(3000, 2000));
 drop(i, random(35, 20), colors[count]);

if (count < colors.length-1) { count++; }
else { count = 0; }     
}
};

var animateDrops = function(startingN) {
 for (var i=startingN; i<speeds.length; i++) { 
  $('.drop:nth-child('+i+')').slideDown(speeds[i]); 
 }
};

createDrops(width);
animateDrops(0);

```