In Jquery mobile for tablet selectors do not work

时间:2015-09-14 15:45:55

标签: jquery jquery-mobile tablet

I would like to understand what is wrong with or what is the right syntax to write. I use jquery 1.11.3 and jqueryMobile 1.4.5 and as tablet a kindle fire with browser firefox and an ipod with browser safari

Instead of document ready, I read that I need to use another kind of syntax because of jquery mobile way of dealing with pages.

With this code there is no alert triggered on tablets, but it works perfectly on the browser on my pc

$(document).on("pagecreate", "#main-page", function(){
    alert("test= " + $('.media').length)
}

Anything that I try to do with the $ doesn't work and show the page like it isn't finished loaded and no alert is shown.

If I check if jquery is working, it shows me that it is not loaded (but it doesn't make any sense to me because $(document) it is jquery!!!).

I have no idea what to do and how to debug, or what I can do.

1 个答案:

答案 0 :(得分:0)

我发现了问题!这是Phalcon调试栏的全部错误。在移动设备上产生的错误是在普通浏览器上没有发生的。此错误使任何jquery或选择器正常工作。

感谢您的帮助和支持!

相关问题