Posts Tagged ‘jquery’

Anything Slider: Go on “Go”

Posted in: Web | Tags: , ,

Last week when I was in the CSS-Tricks forums, somebody wanted to modify the functionality of Chris Coyier’s anythingSlider. Not a huge change, he just wanted to make the slider advance to the next panel when you click “Go”. Made sense to me. By the time you click “Go”, you’re done looking at that panel and are ready for the next one. If it doesn’t advance until after whatever delay you’ve setup, it could be confusing.

Basically what we want to do is make the slider advance to the next panel when we click go, which is the same as advancing to the next panel after we click the start/stop button if the slider ends up playing. It sounds complicated, but it will make more sense when we look at the code.

base.$startStop.click(function(e){
	base.startStop(!base.playing);
	if(base.playing) base.goForward(true);
	e.preventDefault();
});

Continue Reading »

Feb
09
2010
No Comments »

WordPress Archive Jump Menu with jQuery

Posted in: Web | Tags: , , ,

With a bit of code from CSS-Tricks, an idea from the WordPress.com blog, and a little elbow grease, I was able to create something that really fits in well on my site. I transformed the jQuery that I found on CSS-Tricks, which was originally used for accordions and turned it into something largely different that I really happen to like.

All I’m doing here is creating a div with an anchor-link inside it for the controller and an unordered list for the menu items. Then I basically just create a jQuery function that turns the anchor-link into a toggle button.

Continue Reading »

Dec
14
2009
No Comments »