Przechowywanie danych w DOM

<div id="d1" data-state="clicked"></div>

<script>

var status = $("#d1").data("state");

</script>