Sha256: 4f8f31ad4f977e6682bf52429c15dd5f210833427c3a0605fc471f1d311c1069

Contents?: true

Size: 538 Bytes

Versions: 3

Compression:

Stored size: 538 Bytes

Contents

Dust.nav = {

  init : ()->
    $('.main-wrap').data('state', 'open')

    $('#nav .section').bind 'click', ()->
      state = $('.main-wrap').data('state')
      Dust.nav[state]()

  open : ()->
    $('.main-wrap').animate {'width': ($(window).width() - 190)}, 100, (a)->
      $("#nav").toggleClass('nav-open')
      $('.main-wrap').data('state', 'close')

  close : ()->
    $('.main-wrap').animate {'width': ($(window).width() - 45)}, 100, (a)->
      $("#nav").toggleClass('nav-open')
      $('.main-wrap').data('state', 'open')

}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dust-cms-0.0.07 app/assets/javascripts/cms/dust/nav.js.coffee
dust-cms-0.0.06 app/assets/javascripts/cms/dust/nav.js.coffee
dust-cms-0.0.05 app/assets/javascripts/cms/dust/nav.js.coffee