문제

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

ExpressionEngine rendering JS code with { } brackets

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top