This snippet esists in a $.each loop going through some JSON data. The object gets a different class depending on the category it has, it also gets a class with an id so I can later associate other objects in the DOM with that placemarker to call .openPopup() on it and whatnot.
if(iCategory === 'cocktails') {
var myIcon = L.divIcon({className: 'placemark placemark-cocktails id-' + theId});
} else if(iCategory === 'coffee') {
var myIcon = L.divIcon({className: 'placemark placemark-coffee id-' + theId});
}
var marker = new L.Marker(latLng, {icon: myIcon});
map.addLayer(marker);
Hope this helps!