function array_event(){ window.styles += "\n"+ this.dataset.ident + ' { ' + this.dataset.edit + '; }'; } function plain_view(){ $('.edit_style').each(array_event); }