You have to pass in the CSS function as a string. Assuming count
is a Javascript variable, this is probably what you’re trying to do:
$(".container").css('grid-template-columns', 'repeat(' + count + ', 1fr)');
1
solved pass css function as jquery.css() value parameter