N0rA
N0rA

Reputation: 612

Windows phone 7 doesn't execute jquery document.ready using phonegap

Using windows phone 7 emulator and cordova 2.4.0

when i navigate from page A to page B using

window.location.replace("B.html")

the

$(document).ready(function () {}) in B.html didn't execute...

I've tried the same code on an onclick event binder in a dummy button and it worked

I think their is some issue between windows phone 7 and jquery document.ready event, Any one have any idea the reason behind and how to fix?

Upvotes: 1

Views: 639

Answers (1)

Nishanth Nair
Nishanth Nair

Reputation: 2965

You should not rely on document.ready while doing PhoneGap. You should use the deviceready event of PhoneGap. Please see these threads: javascript document.ready() function not working in windows phone emulator with cordova 1.5

JQuery document.ready vs Phonegap deviceready

Upvotes: 2

Related Questions