Tuesday 15 March 2011

Allow jQuery plugin to render html in node.js -



Allow jQuery plugin to render html in node.js -

i'm building tournament site , found great jquery library takes care of bracket creation: jquery bracket

unfortunately, since javascript plugin uses dom-manipulation render want show. i've been looking way allow render html in node.js can serve (kind of template engine such jade jquery instead) haven't found anything.

since jquery (and javascript in general) libraries common, sense should've found way utilize them on server render content static html instead of dynamic javascript in client.

maybe yo can seek (not tested):

var $ = window.jquery; var el = $('<div></div>').bracket({init: the_data });

now, html generated brakets plugin accesible doing

$(el).html()

also, can read useful tutorial, how render javascript chart using nodejs

jquery node.js

No comments:

Post a Comment