Other js components working.
When appended class='parallax', image will disappear.
My slim file is like this.
top.html.slim
.parallax-container
.parallax
= image_tag 'top_hawaii.jpg', width: '100%'
Same problem here
<div class="parallax-container">
<div class="parallax"><img src="public/imgs/web-design.png"></div>
</div>
$(document).ready(function(){
$('.parallax').parallax();
});
for some reason: $('.parallax').parallax(); is not working for me, the images are hidden, I have included jquery.js and materialize.js also materialize.css but parallax not works for me. Any thoughts?
Nvm Found the bug. We are working on it
Fixed in 41afc4c6ed5e499a199e6290663a9747587260a0
Thats works awesome! thanks!!
I am using 0.95.3 from cdnjs.cloudflare.com. It's still not working for me.
I'm still seeing this issue. I have materialize-sass 0.96.1. It works on first load, but navigating to new pages and returning to the page with the parallax effect disappears.
i am seeing this issue in 0.96.1. Image is hidden and not displayed..
I'm also seeing this and have been I was using .95 and now am using .96.1. any clues why this is happening? I need to launch my site today.
My issue was actually related to turbolinks. If you're using Rails, double-check this.
I also can't get the parallax to work.
Using CDN 0.97.0
Any solutions to this?
Same problem with 0.97
I think I found solution for this problem.
@andersdn11 just delete any size settings for image
I dont have any size settings, still won't work. Could it be because i'm working localhost?
I don't think so. I'm also working in localhost
__Best regards
Dmitry SharikovRuby on Rails developer
http://dmitrysharikov.github.io
On Sun, Jul 5, 2015 at 7:31 PM, andersdn11 [email protected]
wrote:
I dont have any size settings, still won't work. Could it be because i'm working localhost?
Reply to this email directly or view it on GitHub:
https://github.com/Dogfalo/materialize/issues/210#issuecomment-118633748
I had this problem with v0.96.0 - fixed it by adding
(function($){
$(function(){
$('.parallax').parallax();
});
})(jQuery);
...in the head rather than in the footer. Images are now visible, parallax working as expected.
I swapped out out the .95 js code for dropdowns into my .96 js and all works fine now. Hope the new build supports parallax and dropdowns.
so i got it working. My problem seemed to be the z-index: -1 on parallax. class
Fix:
.parallax{ z-index: 0; }
Same here. Not working in 0.97, tried in angular controller, script at page, but works only after firing it from console.
I'm getting this problem even with the parallax demo template on the getting started page. The web based demo runs and looks great, but when I download the zip and open index.html locally, the images aren't showing up for me. Chrome and Safari/OS X. It almost works if I set the z-index to 0 - the button stays visible but the head and subhead disappear and even setting a higher z-index on them doesn't make them reappear. Weird stuff.
No images at first, in the footer was this: script src="../../dist/js/materialize.js" and I changed it to: script src="js/materialize.js" and now it works.
Yeah I checked my footer and saw that the script went to bin/materialize.js. Just changed it to js/materialize.js and everything was fine afterwards
version 0.97.6 - parallax not working, div class="parallax" hiding the image
Help it is not working
.parallax img{
background:url("background1.jpg") no-repeat 0% 0%;
background-size:cover;
}
for some reason css is:
.parallax img{
display:none;
...
}
overriding solved the problem:
.parallax img{
display: inherit !important;
}
Same problem:
$this.children("img").one("load", function() {
updateParallax(true);
}).each(function() {
if(this.complete) $(this).load(); // seems to be the problem-function
});
jQuery.Deferred exception: Cannot read property 'indexOf' of undefined TypeError: Cannot read property 'indexOf' of undefined
at r.fn.load (http://localhost/projekte/homepage/extern/jquery/dist/jquery.min.js:4:18685)
at HTMLImageElement.(http://localhost/projekte/homepage/extern/Materialize/js/parallax.js:42:37)
at Function.r.extend.each (http://localhost/projekte/homepage/extern/jquery/dist/jquery.min.js:2:2813)
at r.fn.r.each (http://localhost/projekte/homepage/extern/jquery/dist/jquery.min.js:2:1003)
at HTMLDivElement.(http://localhost/projekte/homepage/extern/Materialize/js/parallax.js:41:12)
at Function.r.extend.each (http://localhost/projekte/homepage/extern/jquery/dist/jquery.min.js:2:2813)
at r.fn.r.each (http://localhost/projekte/homepage/extern/jquery/dist/jquery.min.js:2:1003)
at $.fn.parallax (http://localhost/projekte/homepage/extern/Materialize/js/parallax.js:6:19)
at HTMLDocument.(http://localhost/projekte/homepage/init.js:2:18)
at j (http://localhost/projekte/homepage/extern/jquery/dist/jquery.min.js:2:29588) undefined
Seriously, for me, using jQuery 2.2.4 solved the problem. jQuery 3 has a lot of compatible problems now. >.>
i think it come from version of jquery. Try to user jquery from demo website and it works fine for me.
The problem is definitely compatibility with jQuery 3, downgrading to 2.2.4 solved the issue for me too.
I'm trying to use the Parallax Template, but only the first image is not showing. When I open the browser console developer, a part of it is shown. I've tried everything explained in this issue and on https://krescruz.github.io/angular-materialize/ , but I'm not getting success.
Plus, I'm using an yoman angular-generator project. Any ideia?
@JGeraldoLima What version of jQuery you are using? If not, please try 2.2.4. :)
Version 2.2.4 works for me, thanks
hey @SCLeoX , sorry for the delay. I made it by editing a few .css properties. I don't know why it not worked automatically, but that's enough for now! Thank you very much.
jQuery 2.2.4 fixed the issue and deleted the console indexOf Error.
Damn I REALLY would like to use 3.1
any idea @Dogfalo or any other of the team ? Because #3570 should have solve that.
on the .css file edit the display property
.parallax img {
display: block;
}
If it is necessary to work exactly in the block that is needed, then replace $(window) with $('.you-class')
Most helpful comment
Seriously, for me, using jQuery 2.2.4 solved the problem. jQuery 3 has a lot of compatible problems now. >.>