css - Twitter Bootstrap not recognizing class set through Javascript -


i'm seasoned writer of javascript, experiment in weird ways further understand how things work. i've attempted write application works using angular.js , twitter bootstrap, yet creating of elements via javascript, not hard-coding them html (i hate writing html). far, appears working fine, except bootstrap not recognize class list i've attached table element via javascript. here's quick snippet example:

var mytbl = document.createelement('table'); mytbl.setattribute('class', 'table table-hover table-striped table-bordered table-condensed'); 

the table created fine , class viewable atrribute in debugger, yet styles associated class list not being applied table via bootstrap. i've tried including bootstrap before called function builds table i've tried including bootstrap after build table, , did not make difference. including angular.min.js after constructing table , after including bootstrap. i've written same application in html, associated id table class, , later pulled table javascript variable investigate within debugger, , identical javascript generated table, yet hard-coded html table has style effects of class list , javascript generated 1 not. if can me out, greatly, appreciated.

thanks.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -