jQuery的.show()和BlackBerry OS5 [英] jQuery .show() and BlackBerry OS5

查看:205
本文介绍了jQuery的.show()和BlackBerry OS5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个长镜头,但...

This is probably a long shot, but...

任何人都遇到一个问题,黑莓OS5的Web浏览器使用jQuery的显示(),并导致它要么不(在设备上),工作或崩溃手机(模拟器)?如果声音,找到了一个解决办法?

Anyone run into a problem using jQuery's show() in a BlackBerry OS5 web browser and causing it to either not work (on the device) or crash the phone (simulator)? If sound, found a workaround?

同样的事情发生,我们是否使用.show()或的.css('显示器','块')

The same thing happens whether we use .show() or .css('display','block')

工程在OS6,iOS版,火狐,Chrome,等等等等......但在OS5浏览器中死去。

Works in OS6, iOS, Firefox, Chrome, etc, etc...but dies in the OS5 browser.

哦,我要补充:

据我们所知,这运行我们我们的实际服务器(JSF中,WebSphere)的应用程序时,只有一个问题。当我们在本地测试了jQuery作为一个静态页面,它工作正常。

From what we can tell, this is only an issue when running our application of our actual servers (JSF, websphere). When we test the jQuery locally as a static page, it works fine.

推荐答案

我们发现的问题是,OS5的浏览器只是有从BLOCK改变显示属性为NONE时更新DOM的问题。一个黑莓代表甚至告诉我们,一个人应该只是避免OS5更新DOM(啊!)。

The issue we found is that OS5's browser just has issues updating the DOM when changing display properties from BLOCK to NONE. A BlackBerry rep has even told us that one should just avoid updating the DOM in OS5 (ugh!).

所以,我们结束了持续的解决方案是不使用 .show() .hide()而是我们切换一个类名。除了OS5的所有设备都将有类名称切换显示属性,OS5,但是,将从汽车切换高度 0像素

So, the solution we ended up going with was to not use .show() and .hide() but rather we toggled a class name. Every device except OS5 would have the class name toggle the display property, OS5, however, would toggle the height from auto to 0px

这让OS5开心。

所有这一切说,仍然没有解释的一些变量...比如,我们可以在本地运行code作为一个静态页面,并在模拟器就好运行。但是,如果我们试图加载页面关闭我们的服务器完全相同的code就会崩溃。

All that said, that still doesn't explain some of the variables...such as that we could run the code locally as a static page and run it in the simulator just fine. But the exact same code would crash if we tried loading the page off of our server.

我们还可以在应用程序中使用.show()在其他地方没有问题。

We can also use .show() elsewhere in the app without a problem.

在最后,我相信这是应用,如果一些子元素是有他们的显示切换杀死浏览器的父元素的CSS的一些特定组合。

In the end, I believe it's some particular combination of CSS applied to parent elements that kills the browser if some of its child elements are having their display toggled.

这篇关于jQuery的.show()和BlackBerry OS5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆