views:

21

answers:

0

Hi!

I need to load the codes that will be highlighted by SyntaxHighlighter.

I have this

        $("#syntax").change(function () {
            var code = $('#syntax').val();
            code = "<script type='syntaxhighlighter' class='brush: js'><![CDATA[" + code;
            code += ']]>' + "</" + "script>";
            $('#preview').html(code);

            SyntaxHighlighter.all();
        });

but it doesn't work. What I should do?