I am using CSSGram on my website to make images have Instagram-like filters. This is the method below to add a filter to a image:
with JQUERY:
use addClass method
$('figure').addClass('aden')
see this fiddle
or you can use just javascript:
var a = document.querySelector('figure'); if (a.classList) { a.classList.add('aden'); } else { a.className += ' aden'; }