var models={} $("[data-jq-model]").each(function(){ var model = $(this) var key = model.attr("data-jq-model") var value = model.html() models[key]=value }) $("[data-jq-model]").on("keydown change click focus blur copy cut paste",function(){ $("[data-jq-bind='"+$(this).attr("data-jq-model")+"']").text($(this).val()) })