Solved

CSS Animation Triggered Too Early

Posted on 2014-04-11
13
660 Views
Last Modified: 2014-04-11
Hi, i am using CSS / JS animation transitions on my site. When you scroll the page it triggers various sections to animate (fade in).

I am trying to adjust the animation scroll trigger so that the animation is triggered sooner on scroll.

I have adjusted all of the settings, however there is still one area that is taking too long to trigger... which is the first section under the banner:

ss
I have managed to get all of the other sections to trigger early apart from this one. Can anyone help with this one, thanks in advance

site link
0
Comment
Question by:oo7ml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39993686
Can you point to the parts int the code you are talking about.
0
 

Author Comment

by:oo7ml
ID: 39993692
Thanks Scott. Code below... i just changed the text slightly as don't want to get picked up by SEO (not sure if EE does or not)

<div class="row heading animated fadeInDown">
					<div class="col-sm-6 col-sm-offset-3 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3">
												<h2>th3 l0cal mult1-st0r3</h2>
																		<p>lovel0cal brings all l0cal sh0ps and busin355es together to cr3ate 0ne large comb1ned mult1-st0re which enables them to compete with larger mult1national sh0ps.</p>
												
					</div>
				</div>

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39993722
Are we only looking at the animate.css?  or is there an js/jquery at play?

Yes, google does pick up the text in these threads pretty quickly.  If you mark the question private that prevents google from crawling the page.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:oo7ml
ID: 39993759
There is JS too... if you look at the source code you will see:

return false; });
jQuery('.hype-waypoint').waypoint(function() {
var animation = jQuery(this).attr("data-animate");
var duration = jQuery(this).attr("data-delay");
$(this).delay(duration).queue(function(){
jQuery(this).addClass(animation);
jQuery(this).addClass('animated');
$(this).dequeue(); });
}, { offset: '85%' });
});

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39993784
This piece of code
attr("data-delay")

Open in new window


will refer to something like
<div class="myclass" data-delay="4">Stuff</div>

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39993785
In your code you have
<div class="hype-waypoint" data-animate="fadeInUp" data-delay="200">

Open in new window


By adjusting that number, you should be able to adjust your animation timing.
0
 

Author Comment

by:oo7ml
ID: 39993829
Thanks Scott, however the delay and trigger are two different things.

I have already tried changing all of the delays but they are different... they reference the delay when it is triggered... so essentially i need to trigger earlier and then the delay can kick in.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39993882
I'm not familiar with waypoints.  It looks like the waypoint argument for "offset" that is set to 85% from the top.  You could try decreasing that number.  And there are some page load time issues.  You might want to start combining and compressing files.  

Let me know how decreasing the offset argument works.
0
 

Author Comment

by:oo7ml
ID: 39993948
Thanks Scott... that is exactly what i have done.... i had the offset set to 50% originally and then changed it to 85%.

This worked perfect for all of the animations apart from the one mentioned above - for some reason it seems to have it's own setting somewhere.
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39994045
I would probably start by making a copy, and pulling things out of the page.    In google chrome it seems to work fine although after you scroll to the bottom the first time then scroll back up, once you scroll down the animation is not there.  

I would start by rendering the page, view source , copy and paste to a new page.  That eliminates any issues with ajax.  Then remove all the ajax calls.  Then start pulling things out and see what happens.

I tried looking at the console and there is a lot going on and couldn't pin point.
0
 

Author Comment

by:oo7ml
ID: 39994592
Ok cool, thanks for your help... it is only something small but these smalls things annoy me :-)
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39994600
I think the site looks great and I love the concept for this app.  

My only suggestion for the site is do you need to have the beginning animation with the 3 dots. I know that has been done in the past to prevent FOUT but for speed of loading I prefer to remove.
0
 

Author Comment

by:oo7ml
ID: 39994630
Thanks Scott, much appreciated.

Yeah i was thinking of removing that too. Thanks for all your help (and on other questions).
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
javascript and jquery question 4 26
Web page design problem 3 18
asp.net, radiobuttonlist, c# 3 39
output in HTML format powershell 6 24
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question