I threw my portfolio together a few months ago and now I am trying to go back and clean up the code so that it is easier to add new items etc..
My main problem is that I am using the Alen Grakalic's Easy Slider Jquery plugin to simulate a browser window and everytime I want to add a new portfolio item, I have to add a new block of code that looks something like this:
$("#slider").easySlider({
controlsBefore: '<p id="controls">Scroll: ',
controlsAfter: '</p>',
prevId: 'prevBtn',
nextId: 'nextBtn',
continuous: true,
prevText: 'Up',
nextText: 'Down',
vertical: true
});
In addition, I am forced to add a whole bunch of new ID tags and classes to my CSS, which isn't very practical if I am going to have a very large number of portfolio items. All this duplicate code seems really unnecessary and I feel like there should be a more efficient way to do this.
Is there a way to pare down the necessary code for adding a new slider so that I don't have to add so many new ID tags and JS blocks? Should I skip the plugin and revert to something simpler like slideUp/slideDown? If so, is there a way to detect if the image has slid all the way to the bottom and force it to jump back up to the top like this plugin?
Here is the link: http://richard.designvillain.com