Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced $() with angular.element() #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/scripts/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand All @@ -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"
Expand Down Expand Up @@ -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) ->
Expand Down