Sha256: 4aba7bd256de308cf44497bd409d4a1cfe79328a2d90d3d33d2b354b0efaa477

Contents?: true

Size: 932 Bytes

Versions: 24

Compression:

Stored size: 932 Bytes

Contents

APP.features.mobile = {
  // animate the main button icons on hover:
  init: function () {
    // ADD HINTS TO FORM ELEMENTS
    $('.hint').hint();

    // WATCH WINDOW WIDTH FOR NARROW
    if ($(window).width() < 300) {
      $("body").addClass('narrow');
    } else {
      $("body").removeClass('narrow');
    }

    // MAIN NAVIGATION
    $('#head').on('click', '.navigation', function () {
      $that = $(this);
      $('#navigation')
        .css('top', $('#head').height() + 30) // SET NAVIGATION POSITION (#head height + padding and border)
        .slideToggle(200, function () {
          if ($that.hasClass('down')) {
            $that.removeClass('down');
          } else {
            $that.addClass('down');
          }
        });
      return false;
    });

    // POST INDEX
    $('#posts').on('click', '.post', function () {
      window.location = $(this).attr('data-url');
      return false;
    });

  }
};

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.9 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.8 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.7 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.6 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.5 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.4 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.3 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.2 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.1 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.1.0 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.18 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.17 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.16 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.15 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.14 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.13 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.12 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.11 lib/forge/app/assets/javascripts/features/mobile.js
forge-cli-0.0.10 lib/forge/app/assets/javascripts/features/mobile.js