bannertime / generator-bannertime

Yeoman generator to help build and manage HTML5 banner campaigns.
https://bannertime.github.io/
58 stars 35 forks source link

Using smartObject on html tag #56

Closed ziraga closed 8 years ago

ziraga commented 8 years ago

is there any way to use the smartObject on an Element that is already on the html?

pyramidium commented 8 years ago

You could create a smartObject element inside an existing html tag using the parent property:

this.exampleElement = this.smartObject({
  parent: document.querySelector('.element')
});

However I'm not sure why you'd ever need to do this because all elements should be created as smartObjects.

ziraga commented 8 years ago

I work with a lot of people who refuse to learn the more practical way of doing banners, hence I have to give them a more dumb down version of my files (no gulp, no sass, etc). I just wanted to extend the smartObject features to elements on the html. Basically they get to see all banner elements in html and I get to control them in an easier way.

great tool by the way.

joemidi commented 8 years ago

Thanks @ziraga.

Its a shame you can't convince them to use some tools, it has certainly made our lives easier. Maybe one day they'll come around to the idea.