<div id="source-original" style="display:none"><SOURCE></div>
Then, when you click your button, just toggle between showing and not showing the DIVs.
On Mar 12, 2012, at 9:16 AM, Ciaran Farrell wrote:
> I'm sure that there must be an easy answer to this, but maybe there isn't. I have a <pre id="bar" class="prettyprinter" wrap></pre> into which I dynamically load the contents of a source code file. It seems to work as the contents are displayed with line numbering and styling.
> However, how should I best add a button/link at the top of the page that allows the user to toggle between prettified and raw versions of the content? Someting like a href with id (e.g. foo) doesn't work:
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.