Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 443 Bytes

README.md

File metadata and controls

21 lines (18 loc) · 443 Bytes

Simplify your Javascript breakpoints with a simple breakpoint definition and callback syntax

BreakpointManager = require "breakpoint-manager"

$(document).bind "breakpoint:match", (e, breakpoint) =>
  if breakpoint is "desktop"
    @onDesktop()
  else
    @onMobile()

breakpointManager = new BreakpointManager
  scope: $(document)
  breakpoints:
    mobile:
      min: null
      max: 799
    desktop:
      min: 800
      max: null