Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit 5882d55

Browse files
Gabriel DelépineGabriel Delépine
Gabriel Delépine
authored and
Gabriel Delépine
committed
Automatically use jQuery if available (to keep IE < 8 compatible)
1 parent ae34d64 commit 5882d55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

angular-css-injector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* angular-css-injector v0.2.2
2+
* angular-css-injector v1.0
33
* Written by Gabriel Delépine
44
* License: MIT
55
* https://github.com/Yappli/angular-css-injector/
@@ -12,7 +12,7 @@ angular.module('angular.css.injector', [])
1212
{
1313
// Variables
1414
var singlePageMode = false,
15-
head = angular.element(document.querySelector('head')), // TO make the code IE < 8 compatible, include jQuery in your page and replace "angular.element(document.querySelector('head'))" by "angular.element('head')"
15+
head = angular.element(jQuery === undefined ? document.querySelector('head') : 'head'), // TO make the code IE < 8 compatible, include jQuery in your page
1616
scope;
1717

1818
// Capture the event `locationChangeStart` when the url change. If singlePageMode===TRUE, call the function `removeAll`

0 commit comments

Comments
 (0)