开发者

How to replace deprecated function in jQuery Mobile - updateHash

I tried updating from jQuery Mobile Beta 2 to rc1.

Chro开发者_开发问答me gives me the following error:

Uncaught TypeError: Object # has no method 'updateHash'

I am using changeHash like this:

$.mobile.changePage(page);
$.mobile.updateHash(page, true);

The function seems to be removed since Beta 3. Which function can replace its functionality?


This is now an argument to the method $.mobile.changePage():

changeHash (boolean, default: true) Decides if the hash in the location bar should be updated.

So your code should be updated to:

$.mobile.changePage(page, { changeHash: true });

Source: http://jquerymobile.com/demos/1.0rc1/docs/api/methods.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜