I am working with mapbox.js and leaflet to create a map with a number of overlapping tilelayers. I want to apply some custom CSS to only selected tilelayers, and thus assign these layers to an additional custom CSS class like this:
var layer = L.mapbox.tileLayer(layername).addTo(map);
layer.getContainer().className += ' custom';
Unfortunately, the above did not do the trick, though. Any hints on how to assign a custom CSS class to a given tilelayer in leaflet/mapbox would be very welcome...