Skip to content

Commit

Permalink
Fix IE issue with .prop()
Browse files Browse the repository at this point in the history
  • Loading branch information
reinos committed Aug 27, 2015
1 parent 5ce75dd commit 3f49097
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stickyFooter",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/reinos/jquery.stickyFooter",
"authors": [
"Reinos <[email protected]>"
Expand Down
17 changes: 10 additions & 7 deletions dist/jquery.stickyFooter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jquery.stickyFooter - v1.2.0
* jquery.stickyFooter - v1.2.1
* Simple stickyFooter
* https://github.com/reinos/jquery.stickyFooter
*
Expand All @@ -12,7 +12,9 @@
defaults = {
removeNegativMargin : true,
css : {},
executeWhen : function(){return true;}
executeWhen : function(){
return true;
}
};

// The actual plugin constructor
Expand All @@ -39,8 +41,12 @@

setTimeout(function(){
$(window)
.scroll(function(){obj.positionFooter();})
.resize(function(){obj.positionFooter();});
.scroll(function(){
obj.positionFooter();
})
.resize(function(){
obj.positionFooter();
});
}, 100);
};

Expand All @@ -52,7 +58,6 @@
//execute this when the give condition is true
if(obj.options.executeWhen()) {
//first reset
$elem.prop("style", "");
$elem.attr("style", "");

//set footer height
Expand Down Expand Up @@ -80,15 +85,13 @@
$elem.css(css);
} else {
//reset
$elem.prop("style", "");
$elem.attr("style", "");
$elem.css(obj.options.css);
}

//otherwhise reset
} else {
//reset
$elem.prop("style", "");
$elem.attr("style", "");
$elem.css(obj.options.css);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.stickyFooter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.stickyFooter",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple stickyFooter",
"main": "dist/jquery.stickyFooter.js",
"scripts": {
Expand Down
15 changes: 9 additions & 6 deletions src/jquery.stickyFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
defaults = {
removeNegativMargin : true,
css : {},
executeWhen : function(){return true;}
executeWhen : function(){
return true;
}
};

// The actual plugin constructor
Expand All @@ -31,8 +33,12 @@

setTimeout(function(){
$(window)
.scroll(function(){obj.positionFooter();})
.resize(function(){obj.positionFooter();});
.scroll(function(){
obj.positionFooter();
})
.resize(function(){
obj.positionFooter();
});
}, 100);
};

Expand All @@ -44,7 +50,6 @@
//execute this when the give condition is true
if(obj.options.executeWhen()) {
//first reset
$elem.prop("style", "");
$elem.attr("style", "");

//set footer height
Expand Down Expand Up @@ -72,15 +77,13 @@
$elem.css(css);
} else {
//reset
$elem.prop("style", "");
$elem.attr("style", "");
$elem.css(obj.options.css);
}

//otherwhise reset
} else {
//reset
$elem.prop("style", "");
$elem.attr("style", "");
$elem.css(obj.options.css);
}
Expand Down

0 comments on commit 3f49097

Please sign in to comment.