component / reactive

Tiny reactive template engine
382 stars 48 forks source link

idea: carryover replaced elements classes #71

Closed ianstormtaylor closed 10 years ago

ianstormtaylor commented 11 years ago

this is a common use case i find myself doing:

<div class="integration">
  <nav class="integration-nav" data-replace="replaceNav"></nav>
</div>
View.prototype.replaceNav = function () {
  var el = magic();
  dom(el).addClass('integration-nav');
};

would be cool if the replaced element just carried over the other elements classes, since i can't think of reason i'd apply a data-replace and not want that functionality.

defunctzombie commented 10 years ago

You fixed this :)