Sha256: fe0a3bd12ad163d3cc465ae550224f0e6234026415df67b51f7de535da2fd8de

Contents?: true

Size: 813 Bytes

Versions: 1

Compression:

Stored size: 813 Bytes

Contents

function IsPC() {
  var userAgentInfo = navigator.userAgent;
  var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
  var flag = true;
  for (var v = 0; v < Agents.length; v++) {
       if (userAgentInfo.indexOf(Agents[v]) > 0) {
           flag = false;
           break;
        }
  }
  return flag;
}
$("#nav_pin").click(function(){
  if(IsPC()){
    if(localStorage.getItem('left_nav_status') == "close") {
      $("aside").fadeToggle(100);
      localStorage.setItem('left_nav_status', 'open');
    }else {
      $("aside").fadeToggle(100);
      localStorage.setItem('left_nav_status', 'close');
    }
  } else {
    $("aside").fadeToggle(100);
  }
});
if(!IsPC()){
  $("aside").hide();
}
if(localStorage.getItem('left_nav_status') == "close") {
  $("aside").hide();
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin_help-0.1.5 app/assets/javascripts/aiui.js