moselle: pass index parameter to insertRule, required in old browsers
This commit is contained in:
parent
ddfb83944e
commit
5be0903c6f
|
@ -2,7 +2,7 @@ $(function() {
|
|||
/* set page picture as background */
|
||||
if (document.body.attributes['data-picture']) {
|
||||
var sheet = document.head.appendChild(document.createElement("style")).sheet;
|
||||
sheet.insertRule('body.has-picture nav::after { background-image: url(' + document.body.attributes['data-picture'].value + ')');
|
||||
sheet.insertRule('body.has-picture nav::after { background-image: url(' + document.body.attributes['data-picture'].value + ')', 0);
|
||||
}
|
||||
/* add a class to body when the page got scrolled */
|
||||
$(window).on('scroll', function() {
|
||||
|
|
|
@ -2,7 +2,7 @@ $(function() {
|
|||
/* set page picture as background */
|
||||
if (document.body.attributes['data-picture']) {
|
||||
var sheet = document.head.appendChild(document.createElement("style")).sheet;
|
||||
sheet.insertRule('body.has-picture nav::after { background-image: url(' + document.body.attributes['data-picture'].value + ')');
|
||||
sheet.insertRule('body.has-picture nav::after { background-image: url(' + document.body.attributes['data-picture'].value + ')', 0);
|
||||
}
|
||||
/* add a class to body when the page got scrolled */
|
||||
$(window).on('scroll', function() {
|
||||
|
|
Loading…
Reference in New Issue