JS obtiene el primer elemento por clase
var elements = document.getElementsByClassName('className');
var requiredElement = elements[0];
Captain Obvious
var elements = document.getElementsByClassName('className');
var requiredElement = elements[0];