As @ D4V1D said, it's not possible to access #1through CSS, but with jQuery you can - even in a flat way, without div[id=x]. Cm:
var i = 1;
$('#' + i).css('background-color', 'red');
Try it yourself: http://jsfiddle.net/wn7njfuc/
If the solution does not work for you, your jQuery may not have started without problems.
EDIT 1
According to OP comment, it uses Jade. So try this right in front of your div:
script.
$(document).ready(function () {
var i = 1;
$('#' + i).css('background-color', 'blue');
});
source
share