user can specify element attributes to maintain
updated demo

uses specified element attributes to maintain