treehouse : what would you like to learn today?
Web Design Web Development iOS Development

jQuery highlight script /w Cufon

  • I am trying to get this jQuery highlight script http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html working with Cufon font replacement, but I can only get it working by using php and having to refresh the page.

    Would like to use this script to call the highlight function instead;


    $(function () {
    $(\".runnable\")
    .css({ cursor: \"pointer\"})
    .click(function () {
    $('#content').removeHighlight();
    $('#content').highlight($(this).attr(\"name\"));
    });
    });


    I think it can be done using Cufon.refresh() but I can't get it working... Anyone have any suggestions?