MyBB Community Forums

Full Version: Twitter Bootstrap and JS countdown?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2012-08-12, 01:23 PM)Charlie Hadden Wrote: [ -> ]
(2012-08-12, 07:38 AM)Tom K. Wrote: [ -> ]Also, I assume I can put another attribute on? Like the class? Using:

.attr('class','class2')

You can also use .addClass() if you would prefer that. Either work though.

Good point, I forgot about .addClass() completely.
I just find that using .addClass() and .removeClass() makes it easier to see what it's doing just with a quick glance, rather than having to read context. Only personal preference really though, both ways would work just fine.
Yeah, using addClass() also makes more sense to me too as it does what it says it does so when you come back to the code it's far easier to understand.
Pages: 1 2