...

View Full Version : Script Consolidation



wyclef
12-07-2009, 05:48 PM
Can someone explain to me how I could consolidate this Javascript code a bit more?



/* $("#slider").easySlider(); */

$("#slider").easySlider({
controlsBefore: '<p id="controls">',
controlsAfter: '</p>',
prevId: 'prevBtn',
nextId: 'nextBtn'
});
$("#slider2").easySlider({
controlsBefore: '<p id="controls2">',
controlsAfter: '</p>',
prevId: 'prevBtn2',
nextId: 'nextBtn2'
});
$("#slider3").easySlider({
controlsBefore: '<p id="controls3">',
controlsAfter: '</p>',
prevId: 'prevBtn3',
nextId: 'nextBtn3'
});
$("#slider4").easySlider({
controlsBefore: '<p id="controls4">',
controlsAfter: '</p>',
prevId: 'prevBtn4',
nextId: 'nextBtn4'
});
$("#slider5").easySlider({
controlsBefore: '<p id="controls5">',
controlsAfter: '</p>',
prevId: 'prevBtn5',
nextId: 'nextBtn5'
});
$("#slider6").easySlider({
controlsBefore: '<p id="controls6">',
controlsAfter: '</p>',
prevId: 'prevBtn6',
nextId: 'nextBtn6'
});
$("#slider7").easySlider({
controlsBefore: '<p id="controls7">',
controlsAfter: '</p>',
prevId: 'prevBtn7',
nextId: 'nextBtn7'
});
$("#slider8").easySlider({
controlsBefore: '<p id="controls8">',
controlsAfter: '</p>',
prevId: 'prevBtn8',
nextId: 'nextBtn8'
});



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum