help with plugin

help with plugin

This is probably something pretty basic, but I began making a plugin the other day just to get familiar with the process, and I've run into something that I'm not really sure how to fix.

I started off with something simple, made a basic content slider plugin. Anyway, I can only get it to work on one object. For instance, for now, the html is a container, then within it, an unordered list, and its list items. If I make this twice, give the containers a class of 'slider' and then call the plugin using: $(".slider").slide(); It only works on the first block. Any ideas as to what I could be doing wrong?