Title: Help with mootools
Last modified: August 19, 2016

---

# Help with mootools

 *  [Paul](https://wordpress.org/support/users/bychkiv/)
 * (@bychkiv)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/help-with-mootools/)
 * I want to add into my site scrolling layered background effect similar to vimeo.
   com (like this one [http://test.nattywp.com/preview.php?theme=blogus](http://test.nattywp.com/preview.php?theme=blogus)).
   
   When I try to add code:
 *     ```
       var sun = new Element('img', {
           'src': 'http://assets.vimeo.com/images/land_sun.gif',
           'id': 'sun'
       }).inject(document.body);
       var cloud = new Element('img', {
           'src': 'http://assets.vimeo.com/images/land_cloud.gif',
           'id': 'cloud',
           'styles': {
               'position': 'fixed',
               'z-index': '20',
               'top': '48px',
               'right': ((window.getWidth() - $('main').getCoordinates().right) - 65) + 'px'
           }
       }).inject(document.body);
       var cloud2 = new Element('img', {
           'src': 'http://assets.vimeo.com/images/land_cloud2.gif',
           'id': 'cloud2'
       }).inject(document.body);
       var sun_style = new Fx.Style($('sun'), 'top', {
           duration: 2500,
           transition: Fx.Transitions.Quad.easeOut
       });
       var cloud_style = new Fx.Style($('cloud'), 'top', {
           duration: 2500,
           transition: Fx.Transitions.Quad.easeOut
       });
       var cloud2_style = new Fx.Style($('cloud2'), 'top', {
           duration: 2500,
           transition: Fx.Transitions.Quad.easeOut
       });
       scroller = function() {
           var distance = (window.getScrollTop() / (window.getScrollHeight() - window.getHeight()));
           sun_style.stop().start($('sun').getCoordinates().top, (0 - (distance * 275)));
           cloud_style.stop().start($('cloud').getCoordinates().top, (48 - (distance * 300)));
           cloud2_style.stop().start($('cloud2').getCoordinates().top, (325 - (distance * 425)));
       }
       scroller.periodical(100);
       ```
   
 * nothing was happed. I used free WhiteHouse Themes ([http://wordpress.org/extend/themes/whitehouse](http://wordpress.org/extend/themes/whitehouse)).
   Please help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Sheri Grey](https://wordpress.org/support/users/designsimply/)
 * (@designsimply)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/help-with-mootools/#post-1599339)
 * Looks like someone converted that code from Mootools to jQuery over at Stack 
   Overflow. Maybe this will give you what you need: [http://stackoverflow.com/questions/2636966/mootools-to-jquery-convert](http://stackoverflow.com/questions/2636966/mootools-to-jquery-convert)
 *  Thread Starter [Paul](https://wordpress.org/support/users/bychkiv/)
 * (@bychkiv)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-with-mootools/#post-1599386)
 * Thanks designsimply but I found my mistake in code? not in mootools.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Help with mootools’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [Paul](https://wordpress.org/support/users/bychkiv/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/help-with-mootools/#post-1599386)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
