//"ontouchend" in document會判斷document內是否有這個值(是否支援觸控),並把結果放進touch屬性內,接著再extend進support裡
$.extend($.support, { touch: "ontouchend" in document });

//$.support.touch就可以判斷是否支援觸控螢幕
alert($.support.touch);
Categories: jQuery