Sha256: 9fe3a8fef52ae7de983a1c6bce43e893973b4f75cae95355ed010e47e3cad2ba

Contents?: true

Size: 780 Bytes

Versions: 1

Compression:

Stored size: 780 Bytes

Contents

window.JqAjaxCore2.Widgets = 
  initSlidedownBoxes: ->
    boxes = $(".js-slide-down-box.plain")
  
    boxes.each ->
      ident = JqAjaxCore2.Helpers.randomString()

      $(this).removeClass("plain")
      $(this).addClass(ident)
      btn   = $($(this).children(".js-slidedown-button")[0])
      cont  = $($(this).children(".js-slidedown-content")[0])
    
      btn.addClass(ident)
      cont.addClass(ident)
    
      btn = $(".js-slidedown-button."+ident)
    
      btn.bind "click", ->
        x = $(this).attr('class').split(' ')
        btn_ident = x[x.length-1]
        cont  = $(".js-slidedown-content."+btn_ident)
        
        box = $(".js-slide-down-box."+btn_ident)
        
        session_id = box.attr("data-session-id")
        $(box).toggleClass("open")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jqajax_core2-0.0.81 app/assets/javascripts/jqac2/widgets.js.coffee