javascript - Dynamically injecting code in Twitter Bootstrap carousel -


so, i've built responsive site twitter bootstrap. problem i've done using visible-phone, visible-tablet, , visible-desktop. means when views source code, have whole sections included twice or 3 times, in order around problems differences in span amounts, or, instance, because carousel on tablet should have 2 items, while on desktop should have 4.

i'm wondering if i'm doing right. should injecting (or adding? not sure of right name) code dom dynamically using javascript, based on screen size? or should editing around custom, simple .php files based on screen size? don't know, , can't find answer practice anywhere. i've tried looking @ sites this, never find javascript script adds stuff in situation. given, i'm not sure i'd looking for.

any pointers?

i avoid using script dynamically add content; fellow developer makes less intuitive (in opinion) , aim produce intuitive code chap after me.

if requirements state carousel should have 4 items on desktop , 2 on mobile, think solution valid.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -