Solved

gif banner animation loads randomly in mobile

Posted on 2016-11-23
3
125 Views
Last Modified: 2016-11-28
Hi, I have an gif animation banner overlay on http://www.telstra.com.au/deals page. This loads fine in desktop. in small screen devices and mobile the animation is showing up randomly. Sometimes gif loads animation doesnt play and will show up the html banner beneath it.

any idea why this is happening
0
Comment
Question by:Perumal_RM
[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
  • 2
3 Comments
 
LVL 19

Expert Comment

by:NerdsOfTech
ID: 41899956
What's its the  file size, and dimensional size, of the gif; and which responsive css framework, if any,  are you using?
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 41900515
open this image in your browser : http://www.drodd.com/images15/numbers15.jpg
test page : https://jsfiddle.net/q46amj2h/

So it's not a GIF but here you can do what you want and have the hand on the animation to be sync.

<div id="countdown">
  <a href="#">
    <img src="http://www.drodd.com/images15/numbers15.jpg" class="img10" width="1600" height="1200" />
  </a>
</div>

Open in new window


jQuery(function($) {
	var counter = 10;
	$("#countdown img").load(function() {
		var t = setInterval(function() {
    	counter--;
      if(counter<1) 
      	clearInterval(t);
      else
    		$("#countdown img").attr("class", "img"+counter);
    }, 1000);		 	
  });
});

Open in new window


#countdown a {
    width: 364px;
    height: 364px;
    overflow: hidden;
    display: block;
    position: relative;
}
#countdown img {
    position: absolute;
    border: 0;
}
.img1  {
    top: 0;
    left: 0;
}
.img2  {
    top: 0;
    left: -417px;
}
.img3 {
    top: 0;
    left: -829px;
}
.img4 {
    top: 0;
    left: -1236px;
}
/* SECOND LINE */
.img5 {
    top: -410px;
    left: 0;
}
.img6 {
    top: -410px;
    left: -417px;
}
.img7 {
    top: -410px;
    left: -829px;
}
.img8 {
    top: -410px;
    left: -1236px;
}
/* THIRD LINE */
.img9 {
    top: -836px;
    left: 0;
}
.img10 {
    top: -836px;
    left: -417px;
}

Open in new window

0
 
LVL 19

Expert Comment

by:NerdsOfTech
ID: 41900530
That's probably the issue then. Some mobile devices won't allow Javascript/jQuery/etc . Therefore the best approach would be to slice the image up and make an actual .gif of it. Use Photoshop or your favorite image editor to do this or create an extremely low budget gig for an expert to do it for you.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
Some of the SEO trends we might expect in 2017.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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…

719 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