Skip to content
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.

Commit

Permalink
don't repeat yourself
Browse files Browse the repository at this point in the history
  • Loading branch information
tlaziuk committed Oct 25, 2016
1 parent 0da7397 commit 125df64
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jquery.mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { Carousel, CarouselOpt } from './carousel'

declare global {
interface Window {
jQuery: any
jQuery: {
fn: any
}
}
}

if (window.jQuery) {
if (window.jQuery && !window.jQuery.fn.Carouselic) {
const map = new WeakMap<HTMLElement, Carousel>()
window.jQuery.fn.Carouselic(function(this: any, options: CarouselOpt = {}) {
let res: Carousel[] = []
Expand Down

0 comments on commit 125df64

Please sign in to comment.