Frage

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.

War es hilfreich?

Lösung

A quick google found

$conf[‘protect_javascript’] = ‘n’;

and

ExpressionEngine rendering JS code with { } brackets

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top