Hi, 1st post here & I'm pretty new to JS & don't know much, but I've been dealing with using so many jquery plugins on web projects lately that I want to tweak in certain ways, so I'm just starting to learn basics. In the meantime, I've got this old carousel plugin (external js) I'm needing to use, wish I could use another carousel but they don't seem to work for what I'm doing. Problem is that the controls are very plain, just text & coded in the plugin. I want to take the functions that control previous & next actions, & get them into links that can work from my php file, & I don't want the prev & next links next to each other like they are in the plugin. But the way things are coded in this plugin I don't really understand how I would do this. Embarrassingly spent a few days trying to work this out to no avail.
This is the section from the plugin that controls & has the generic back & forward buttons, there is pagination code in the plugin too but that is fine. Also here is the full plugin if needed https://github.com/richardscarrott/j...ry.carousel.js

Code:
insertNextPrevLinks: function() {
this.prevLink = $('<a href="#" class="prev">Prev</a>')
.bind('click.carousel', $.proxy(this, 'prevItem'))
.appendTo(this.container);
this.nextLink = $('<a href="#" class="next">Next</a>')
.bind('click.carousel', $.proxy(this, 'nextItem'))
.appendTo(this.container);
},
nextItem: function() {
this.itemIndex = this.itemIndex + this.options.itemsPerTransition;
this.animate();
return false;
},
prevItem: function() {
this.itemIndex = this.itemIndex - this.options.itemsPerTransition;
this.animate();
return false;
},
updateBtnStyles: function() {
if (this.options.pagination) {
this.paginationLinks
.children('li')
.removeClass('current')
.eq(Math.ceil(this.itemIndex / this.options.itemsPerTransition))
.addClass('current');
}

if (this.options.nextPrevLinks) {
this.nextLink
.add(this.prevLink)
.removeClass('disabled');
if (this.itemIndex === (this.noOfItems - this.options.itemsPerPage)) {
this.nextLink.addClass('disabled');
}
else if (this.itemIndex === 0) {
this.prevLink.addClass('disabled');
}
}
},
animate: function() {
var nextItem, pos;
// check whether there are enough items to animate to
if (this.itemIndex > (this.noOfItems - this.options.itemsPerPage)) {
this.itemIndex = this.noOfItems - this.options.itemsPerPage; // go to last panel - items per transition
}
if (this.itemIndex < 0) {
this.itemIndex = 0; // go to first
}
nextItem = this.items.eq(this.itemIndex);
pos = nextItem.position();

if (headache) {
this.runner
.stop()
.animate({left: -pos.left}, this.options.speed, this.options.easing);
}
else {
this.mask
.stop()
.animate({scrollLeft: pos.left}, this.options.speed, this.options.easing);
}
this.updateBtnStyles();
}
};