Wednesday, January 30, 2013

More fun with the base tag!

I have a post from a few years ago about using the base tag for debugging. Well I just figured out an even cooler way to use it in jsFiddle demos!

I have a base jsFiddle demo for just about every plugin I've made. It makes it easier for others to experiment with all of the plugin options to get a better feel for it. Well, at least I think so. At the very least, it makes it easier for me to build a demo to help all of you ;)

Anyway, I wanted to link to the images from the AnythingSlider github repo. The urls end up being quite long: http://css-tricks.github.com/AnythingSlider/demos/images/slide-civil-1.jpg

Enter the base tag! I just add it to the top of the html frame, and BAM short url sweetness inside :P



I tried making this same demo with codepen.io, but sadly it didn't work =(
Update 1/18/2014: It works on codepen.io now!