Javascript Question

JQuery: How to give a width of two other element's sum?

I want my .scrollbox to be a width of two element's sum * a variable.

var videos = $('.videolink').length;
$ (".scrollbox").width(
$ ( (".ytimg").width()+(.videotext).width() )*videos

Answer Source

Probably just need some code cleanups (attach "$" to "(", add "$" to the right places).

var videos = $('.videolink').length;
   ( $('.ytimg').width() + $('.videotext').width() ) * videos
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download