Closed diennguyen2002 closed 8 years ago
Thanks a lot !
Quick question: https://github.com/yubinbango/yubinbango Does it work on mobile? I try on desktop, that works perfectly. But still not on mobile.
@diennguyen2002 What's your environment? iOS? Android? What's version?
I just used your example code:
<script src="https://yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script>
<form class="h-adr">
<span class="p-country-name" style="display:none;">Japan</span>
〒<input type="text" class="p-postal-code" size="8" maxlength="8"><br>
<input type="text" class="p-region p-locality p-street-address p-extended-address" /><br>
</form>
It works on desktop browser. But on mobile Android monaca (Hybrid App Development Tools) does not (I used angularjs and onsen ui). Do you have any idea?
use angular2? Sample code, See >>> http://plnkr.co/edit/syYdWNQ33uWaomGWT2P5?p=preview
If you make dynamic dom, you should call init code:
ngAfterViewChecked() { new YubinBango.MicroformatDom(); }
cf. https://angular.io/docs/ts/latest/guide/lifecycle-hooks.html
Good Luck!
JSONDATA = 'https://yubinbango.github.io/yubinbango-data/data'; CACHE = []; PREFMAP = [ null, '北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県', '茨城県', '栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県', '新潟県', '富山県', '石川県', '福井県', '山梨県', '長野県', '岐阜県', '静岡県', '愛知県', '三重県', '滋賀県', '京都府', '大阪府', '兵庫県', '奈良県', '和歌山県', '鳥取県', '島根県', '岡山県', '広島県', '山口県', '徳島県', '香川県', '愛媛県', '高知県', '福岡県', '佐賀県', '長崎県', '熊本県', '大分県', '宮崎県', '鹿児島県', '沖縄県' ]; fetchRemote = function {....}
When I build, errors happen, then I try to put "var" before them EX: var JSONDATA ... var CACHE ... var PREFMAP .. var fetchRemote ....
And it works. So if possible please add "var". BTW, i built by monaca (Hybrid App Development Tools). Thanks in advanced