Sha256: 9874681d1b79d18100dcccf5f9a26472a6f11f4343ee4197807b2cd4d337ad63

Contents?: true

Size: 437 Bytes

Versions: 1

Compression:

Stored size: 437 Bytes

Contents

angular.module('EssayApp.directives').directive "stickInParent", ['$timeout', ($timeout) ->
  restrict: 'A'
  scope: true
  link: (scope, element, attrs) ->
    defaults = {
    }
    options = scope.$eval(attrs.stickInParent) || {}
    options = $.extend defaults, options

    initSticky = ->
      return if options.parent? && $(options.parent).length is 0
      element.stick_in_parent(options)

    $timeout initSticky, 10, false
]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/assets/javascripts/app/directives/stick_in_parent.js.coffee