Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions js/rrssb.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,13 @@

var checkSize = function(init) {
// loop through each instance of buttons
$('.rrssb-buttons').each(function(index) {

$('.rrssb-buttons').each(function(buttonsIndex) {
var self = $(this);
var buttons = $('li', self);

// get buttons in reverse order and loop through each
$(buttons.get().reverse()).each(function(index, count) {

var button = $(this);
$(buttons.get().reverse()).each(function(index, value) {
var button = $(value);

if (button.hasClass('small') === false) {
var txtWidth = parseFloat(button.attr('data-size')) + 55;
Expand All @@ -218,14 +216,12 @@
if (txtWidth > btnWidth) {
var btn2small = buttons.not('.small').last();
$(btn2small).addClass('small');
sizeSmallBtns();
}
}

if (!--count) backUpFromSmall();
});
});

sizeSmallBtns();
backUpFromSmall();
// if first time running, put it through the magic layout
if (init === true) {
rrssbMagicLayout(sizeSmallBtns);
Expand Down
2 changes: 1 addition & 1 deletion js/rrssb.min.js

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