Concatenation in jQuery

Posted by Nimbuz on Stack Overflow See other posts from Stack Overflow or by Nimbuz
Published on 2010-03-11T10:04:48Z Indexed on 2010/03/11 19:19 UTC
Read the original article Hit count: 156

Filed under:
|
|
|
var os = $.client.os; // mac
var browser = $.client.browser; // firefox
var browserversion = $.client.browserversion; // 3
$('#root').addClass( os + browser + browserversion );

.. results in <div id="root" class="macfirefox3">. How do I add spaces between them?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery