Testing Scrolling Events with Qunit.js

When I was writing the unit test for Anchorific.js, I was having a hard time writing test for the ScrollSpy implementation as there was not many documentation on testing for scrolling event. Therefore, I decided to come up with my own solution, which is not perfect, but it does a great job in doing what I wanted it to do. So, lets assume that we have a simple ScrollSpy plugin that will update the active state of the navigation based on your scroll position. Just have a look at the demo page of Anchorific.js, as Scrollspy.js was extracted from it. Read More

Anchorific.js is now on Github!

I created Anchorific.js in order to learn three things:  GruntQunit, and how to develop a jQuery plugin. So, I developed a jQuery plugin in order to this. I am a big believer in learning by doing. Learning passively through a book just never works for me and I just need to go out there and do it. This is the real reason why Anchorific.js was born; it is not because I was too lazy to create anchored headings and anchor navigations on a single-page document. Read More