main.js 873 B

12345678910111213141516171819202122232425262728293031
  1. /* 兼容 */
  2. if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
  3. var msViewportStyle = document.createElement('style');
  4. msViewportStyle.appendChild(
  5. document.createTextNode(
  6. '@-ms-viewport{width:auto!important}'
  7. )
  8. );
  9. document.querySelector('head').appendChild(msViewportStyle);
  10. }
  11. $(function () {
  12. var nua = navigator.userAgent;
  13. var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1);
  14. if (isAndroid) {
  15. $('select.form-control').removeClass('form-control').css('width', '100%');
  16. }
  17. });
  18. // 下拉菜单
  19. /*
  20. $('.dropdown').mouseover(function(){
  21. $('.dropdown').addClass("open");
  22. });
  23. $('.dropdown').mouseleave(function(){
  24. $('.dropdown').removeClass("open");
  25. });
  26. $('.dropdown-menu').mouseleave(function(){
  27. $('.dropdown-menu').slideUp();
  28. });
  29. */