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/
A blog to store guides and notes and help on coding. Mostly .Net C# SQL ASP.Net and other related technologies. I post on here things that helped me solve coding issues that I hope will be of help to others.
Thursday, 21 August 2014
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.
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.
Subscribe to:
Posts (Atom)