I have a variable in Sass which determines how many columns
are supposed to fit in 1 row
for my grid system.
Normally, those are 12 columns
.
In JavaScript I've got a function which checks if there are more then 12 column
s in a row
.
If so, it hides the whole row.
This function looks like this:
function checkColumns() {
var maxColumns = 12;
$('.row').each(function () {
var elementsLength = $(this).children('.column').length;
if (elementsLength > maxColumns) {
$(this).remove();
}
});
}
Is there any way to change the maxColumns
variable to the same number which is in my sass variables? Besides then changing it manually every time I change the number in my sass file.