Wasim Khan Wasim Khan - 1 year ago 157
TypeScript Question

How to change css by using tag or class name in typescript?

I want to change top position of element in ionic 2 using their tag name or class name just like we do in JavaScript.

Answer Source

Please you can try

//Get the element by tag name
let element = document.getElementsByTagName('Tag_name');   

Remember it when you get an element by tag it will return an array.

Please add an example, so I can help you

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download