app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee in activeadmin-1.0.0 vs app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee in activeadmin-1.1.0
- old
+ new
@@ -30,11 +30,10 @@
@isOpen = false
@$menuList.fadeOut this.options.fadeOutDuration
@
destroy: ->
- @$element.unbind()
@$element = null
@
isDisabled: ->
@$menuButton.hasClass 'disabled'
@@ -95,7 +94,11 @@
@$menuList.css 'left', centered_menu_left
@$nipple.css 'left', menu_center - nipple_center
$.widget.bridge 'aaDropdownMenu', ActiveAdmin.DropdownMenu
-$(document).on 'ready page:load turbolinks:load', ->
+onDOMReady = ->
$('.dropdown_menu').aaDropdownMenu()
+
+$(document).
+ ready(onDOMReady).
+ on 'page:load turbolinks:load', onDOMReady