Menu icon Foundation

Designer | Wichita, Kansas

I am the Founder and CEO of Foundation Pixel - A Unique Design Team -

My Posts


My Comments

Clayton Allen commented on Brian Martin's post almost 6 years

Do you think that perhaps adding some quotes to your rule may help?

 background-image:url("img/background.png");

Like so?

Cheers, Hope this helps...

Clayton Allen

Clayton Allen commented on Brian Martin's post almost 6 years

#mobley-header {
  background-image: url("../images/data_room.png");
  background-position: center 0;
}

Clayton Allen commented on Brian Martin's post almost 6 years

www.MobleyTek.com

This is a site that I have been working on and uses the above code in the app.js file. If you view the page you will see that the parallax works (even though it is a simple approach). I am certain you will have some more efficient replies as well.

Be sure to view the source code and css using the developer tools of your choice.

Cheers,

Clayton Allen

Clayton Allen commented on Brian Martin's post almost 6 years

$(document).foundation();

$(window).scroll(function(e){
  parallax();
});

function parallax(){
  var scrolled = $(window).scrollTop();
  $('#mobley-header').css('background-position','center ' + -(scrolled*0.35)+'px');
}

Posts Followed

No Content

Following

    No Content

Followers

My Posts

My Comments

You commented on Brian Martin's post almost 6 years

Do you think that perhaps adding some quotes to your rule may help?

 background-image:url("img/background.png");

Like so?

Cheers, Hope this helps...

Clayton Allen

You commented on Brian Martin's post almost 6 years

#mobley-header {
  background-image: url("../images/data_room.png");
  background-position: center 0;
}

You commented on Brian Martin's post almost 6 years

www.MobleyTek.com

This is a site that I have been working on and uses the above code in the app.js file. If you view the page you will see that the parallax works (even though it is a simple approach). I am certain you will have some more efficient replies as well.

Be sure to view the source code and css using the developer tools of your choice.

Cheers,

Clayton Allen

You commented on Brian Martin's post almost 6 years

$(document).foundation();

$(window).scroll(function(e){
  parallax();
});

function parallax(){
  var scrolled = $(window).scrollTop();
  $('#mobley-header').css('background-position','center ' + -(scrolled*0.35)+'px');
}

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content