What is the best practice to store an array of values in a html (from php) attribute and later access them from javascript/jQuery?
<div class="storage" someAttr=?? /></div>
Its basically a simple array like (code_1,code_2,code_3,...)
Im thinking of doing a simple someAttr="code_1;code_2;code_3" and then exploding it:
      var a = $(this).attr('someAttr');
      (a.split(";")).forEach(function (attr){
        console.log(attr);
      });
 
     
     
    