?
Solved

gif banner animation loads randomly in mobile

Posted on 2016-11-23
3
Medium Priority
?
134 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 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 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