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

Better calc detection & fallback, code optimisations & cleanup #89

Merged
merged 9 commits into from
Apr 14, 2015
Prev Previous commit
Next Next commit
Fixed incorrect indentation. Removed unused viewportUnits support pro…
…perty.
IanCaunce committed Dec 14, 2014
commit feeb79096f3e11607596ba457fbac6b3be2c5353
17 changes: 8 additions & 9 deletions js/rrssb.js
Original file line number Diff line number Diff line change
@@ -21,8 +21,7 @@
'use strict';

var support = {
calc : false,
viewportUnits : false
calc : false
};

/*
@@ -93,11 +92,11 @@

var buttons = jQuery('li', self);
var smallButtons = buttons.filter('.small');
var totalBtnSze = 0;
var totalTxtSze = 0;
var upCandidate = smallButtons.first();
var nextBackUp = parseFloat(upCandidate.attr('data-size')) + 55;
var smallBtnCount = smallButtons.length;
var totalBtnSze = 0;
var totalTxtSze = 0;
var upCandidate = smallButtons.first();
var nextBackUp = parseFloat(upCandidate.attr('data-size')) + 55;
var smallBtnCount = smallButtons.length;

if (smallBtnCount === buttons.length) {
var btnCalc = smallBtnCount * 42;
@@ -137,7 +136,7 @@
var self = jQuery(this);
var buttons = jQuery('li', self);
var elems = buttons.nextAll();
var count = elems.length;
var count = elems.length;

// get buttons in reverse order and loop through each
jQuery(buttons.get().reverse()).each(function(index, count) {
@@ -170,7 +169,7 @@
jQuery('.rrssb-buttons').each(function(index) {
var self = jQuery(this);
var regButtonCount;
var regPercent;
var regPercent;
var pixelsOff;
var magicWidth;
var smallBtnFraction;
4 changes: 2 additions & 2 deletions js/rrssb.min.js

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