$('.multiplier:visible').text()
var options = document.querySelectorAll('.multiplier'),
multiplier;
[].forEach.call(options, function (option) {
if (option.style.display == 'block')
{
multiplier = option.innerText;
}
});
alert(multiplier);
parseFloat()
, если есть такая необходимость. var critical = require('critical');
gulp.task('critical', function (cb) {
critical.generate({
base: '_site/',
src: 'index.html',
css: ['css/all.min.css'],
dimensions: [{
width: 320,
height: 480
},{
width: 768,
height: 1024
},{
width: 1280,
height: 960
}],
dest: '../_includes/critical.css',
minify: true,
extract: false,
ignore: ['font-face']
});
});
var gulp = require('gulp');
var uncss = require('gulp-uncss');
gulp.task('default', function() {
gulp.src('site.css')
.pipe(uncss({
html: ['index.html', 'about.html']
}))
.pipe(gulp.dest('./out'));
});