Hi guys, just a quick post to show you how to add custom messages to your code snippets that you are displaying on your web page. An example is on the blog below (code shown below look at the top right hand corner) where I wanted to add extra usability to the code snippets by tell you that you can double click them to edit or copy the code held within them. Which I thought was not particularly obvious, especially if you have not seen it done before.

Related Posts:

/* Append "Double Click to Edit Code" to code displays */
setTimeout(function() {
     $('.syntaxhighlighter').prepend('double click code to edit/copy');
}, 5000);
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.

Free Guide:

How to Choose the Right Charting Library for Your Application

How do you make sure that the charting library you choose has everything you need? Sign up to receive this detailed guide from FusionCharts, which explores all the factors you need to consider before making the decision.

No Reader comments

Special Offer
Free course!

Git into it! Bonus course Introduction to Git is yours when you take up a free 14 day SitePoint Premium trial.