问题描述
你好朋友,
我有gif动画问题一些事件。我正在使用jquery ui对话框
1.我只是把gif图像放在div中,在每个事件中,我只是打开了那个对话框。所以这种情况下,gif图像在所有IE版本中都没有动画。
2.所以我在javascript中写了一个条件,如果浏览器是IE,那么我在IMG元素中添加了IMG元素div。
Hello friends,
I having gif animation issue one some events. I am using jquery ui dialog
1. I just put gif image in div, and on every events, I just opened that dialog. So this case, gif image was not animated in all IE versions.
2. So I write one condition in javascript, If browser is IE then I appended IMG element in div.
if ($.browser.msie) {
$("#divLoading div").html("");
$("#divLoading div").append("<img src=\"/images/9L_Loading.gif\" />");
}
3.在此之后,在firefox中,每当我点击链接时,gif图像都不会从第一个动画位置。我的意思是,假设,我点击一次,然后从开始动画gif图像,当我点击其他链接然后gif开始当前位置的动画。在短片中,动画在无形位置。
4.所以我删除IE的上述条件,意味着在每个浏览器中,我都在div中添加了gif图像。
所以在这种情况下,无论何时回发表单。 gif在firefox中没有动画,当我们通过简单的导航链接重定向到其他表单时它正在工作。
5.然后我写下面的代码但没有运气。
3. Now after that, in firefox, whenever I click on link, gif image is not animated from first position. I mean, suppose, I click once, then gif image is animated from beginning, and when I click on other link then gif start animation for current position. in short image is being animated in invisible position.
4. So I remove the above condition for IE, means In every browser, I appended gif image in div.
So in this case, whenever form is posted back. gif is not animated in firefox, it is working when we redirect to other form by simple navigation link.
5. then I write following code but no lucked.
if ($.browser.msie) {
$("#divLoading div").html("");
$("#divLoading div").append("<img src=\"/images/9L_Loading.gif\" />");
} else {
$("#divLoading div img").attr("src", "/images/9L_Loading.gif");
}
有人可以帮我解决浏览器中的这个gif图像问题吗?
谢谢
Imrankhan
Can anybody help me to resolve this gif image problem in browsers?
Thanks
Imrankhan
推荐答案
3.在此之后,在firefox中,每当我点击链接时,gif图像都不会从第一个动画位置。我的意思是,假设,我点击一次,然后从开始动画gif图像,当我点击其他链接然后gif开始当前位置的动画。在短片中,动画在无形位置。
4.所以我删除IE的上述条件,意味着在每个浏览器中,我都在div中添加了gif图像。
所以在这种情况下,无论何时回发表单。 gif在firefox中没有动画,当我们通过简单的导航链接重定向到其他表单时它正在工作。
5.然后我写下面的代码但没有运气。
3. Now after that, in firefox, whenever I click on link, gif image is not animated from first position. I mean, suppose, I click once, then gif image is animated from beginning, and when I click on other link then gif start animation for current position. in short image is being animated in invisible position.
4. So I remove the above condition for IE, means In every browser, I appended gif image in div.
So in this case, whenever form is posted back. gif is not animated in firefox, it is working when we redirect to other form by simple navigation link.
5. then I write following code but no lucked.
if (
这篇关于不同浏览器中的GIF动画问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!