After much digging and searching about I haven't found a solution that allows for EE bracket tags to correctly render within javascript. It just renders the EE tag as text and not the actual code within the global snippet.
$config['remove_unparsed_vars'] = 'y';
var $containerHeight = $('.section-content').height();
var widget = ('{list}');
if ( $containerHeight > 1500 ) {
$('.widget-box').append(widget);
}
Any thoughts or feedback will be much appreciated.
A quick google found
$conf[‘protect_javascript’] = ‘n’;
and