Dynamically build card via javascript