Thursday, 21 August 2014

How to Embed Code Snippets in Blogger

Ok so previously I used SyntaxHighlighter to do this but have noticed that has stopped working on some of my blog posts.

So I had a look for another solution and came across Gist from GitHub. You can save snippets of code on there site as a public file and then embed them into your blog and they look great.

Try it out. https://gist.github.com/

How To Permanently Link Arrow Keys to a ScrollBar using JQuery

Here is a little snippet of JQuery code to link your Up and Down arrow Keys to a specific scroll bar to make it work even if the element it is attached to is not in focus.


This uses the JQuery animate() function attached to the element that contains the scroll bar.
You then provide to the scrollTop porpery the current position of the scroll bar plus or minus a value you want to move it by.