Question

I'm currently using the google prettify script prettyPrint. It functions properly, except that it only has the one function call to do the whole page:

prettyPrint();

Ideally I'd like a jquery wrapper that allows:

$("#myelem").prettyPrint();

However this would also suffice:

prettyPrint('myElem');

I have a lot of <pre> tags and initializing them all at the same time is overkill. how do I target a specific element with prettyPrint?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top