From 597b77c6b438e12badee410708c42eea0394f7c1 Mon Sep 17 00:00:00 2001 From: Keyes Date: Wed, 1 Apr 2015 09:59:03 +0200 Subject: [PATCH] replaced $() with angular.element() This is necessary if jQuery runs in noConflict-Mode, and $ isn't accessible - angular.element always contains jQuery (or jqLite) https://docs.angularjs.org/api/ng/function/angular.element --- app/scripts/app.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/scripts/app.coffee b/app/scripts/app.coffee index f10dd50..84377dc 100644 --- a/app/scripts/app.coffee +++ b/app/scripts/app.coffee @@ -53,14 +53,14 @@ angular.module('slick', []) link: (scope, element, attrs) -> destroySlick = () -> $timeout(() -> - slider = $(element) + slider = angular.element(element) slider.slick('unslick') slider.find('.slick-list').remove() slider ) initializeSlick = () -> $timeout(() -> - slider = $(element) + slider = angular.element(element) currentIndex = scope.currentIndex if scope.currentIndex? @@ -72,8 +72,8 @@ angular.module('slick', []) adaptiveHeight: scope.adaptiveHeight is "true" arrows: scope.arrows isnt "false" asNavFor: if scope.asNavFor then scope.asNavFor else undefined - appendArrows: if scope.appendArrows then $(scope.appendArrows) else $(element) - appendDots: if scope.appendDots then $(scope.appendDots) else $(element) + appendArrows: if scope.appendArrows then angular.element(scope.appendArrows) else angular.element(element) + appendDots: if scope.appendDots then angular.element(scope.appendDots) else angular.element(element) autoplay: scope.autoplay is "true" autoplaySpeed: if scope.autoplaySpeed? then parseInt(scope.autoplaySpeed, 10) else 3000 centerMode: scope.centerMode is "true" @@ -105,8 +105,8 @@ angular.module('slick', []) useCSS: scope.useCSS isnt "false" variableWidth: scope.variableWidth is "true" vertical: scope.vertical is "true" - prevArrow: if scope.prevArrow then $(scope.prevArrow) else undefined - nextArrow: if scope.nextArrow then $(scope.nextArrow) else undefined + prevArrow: if scope.prevArrow then angular.element(scope.prevArrow) else undefined + nextArrow: if scope.nextArrow then angular.element(scope.nextArrow) else undefined slider.on 'init', (sl) ->