Nowhere can I find how to find out the name of css .

For example, from here:

 <div class="item item-2" id='lost'><div> <script> $('#lost'). //как дописать, чтобы получить название class 

    2 answers 2

    So the whole class name

     document.getElementById('lost').className 

    So the class name in the array

     document.getElementById('lost').classList 

       console.log($('#lost').attr('class')); 
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="item item-2" id='lost'><div>