ສະຖານະພາບທີ່ສິງຂອງ jQuery Mobile
ສະຖານະພາບ orientationchange ຂອງ jQuery Mobile
ສະຖານະພາບ orientationchange ໄດ້ຖືກຈຸດໃຫ້ປະຕິບັດ ເມື່ອຜູ້ນຳໃຊ້ຫຼິ້ນກະພິບພາບພາບທີ່ສິງ ຫລື ພູມ:

ມື້ປະຈຳ
ຖ້າພວກເຈົ້າຕ້ອງໃຊ້ສະຖານະພາບ orientationchange, ກະທຳສະເໜີມັນໄປໃນອຸປະກອນ window:
$(window).on("orientationchange",function(){ alert("ສະຖານະພາບໄດ້ປ່ຽນ! "); });
ກອງກວດ callback ສາມາດກະກຽມຄຳປະມານປະເພາະ event ໂອບັບ, ທີ່ຈະກັບຄືນກັບສະຖານະພາບຂອງອຸປະກອນປີວນີ້: "portrait" (ອຸປະກອນປີວນີ້ຖືກນຳມາກວດຂອງຕົວຢ່າງທີ່ສິງ) ຫລື "landscape" (ອຸປະກອນປີວນີ້ຖືກນຳມາກວດຂອງຕົວຢ່າງທີ່ພູມ):
ຕົວຢ່າງ
$(window).on("orientationchange",function(event){ alert("ສະຖານະພາບ: " + event.orientation); });
ຍ້ອນວ່າສະຖານະພາບ orientationchange ຕິດຕໍ່ຂອງໂອວິນໄວ, ພວກເຮົາສາມາດໃຊ້ຜົນຄວາມສະຖານະພາບ window.orientation ເພື່ອ, ອີງຕາມອີກວ່າ, ການກະກຽມຊື່ສະຖານະພາບ ອີກຄັ້ງໃຫ້ຫາກມີການຫາຍຫາບລະຫວ່າງ portrait ແລະ landscape ພາບ:
ຕົວຢ່າງ
$(window).on("orientationchange",function(){ if(window.orientation == 0) // ລະຫວ່າງຮູບພາບ { $("p").css({"background-color":"yellow","font-size":"300%"}); } else // Landscape { $("p").css({"background-color":"pink","font-size":"200%"}); } });
ຄໍາແນະນຳ:window.orientation ກວດສອບ portrait ຄື 0, landscape ຄື 90 ຫຼື -90.