I have a javascript file that is used for a slider, which retrieves image URLs from an array. How can I dynamically add image URLs from the code behind? I need to fetch picture URLs from a database and insert them into the array using asp.net c#. The jQuery code snippet looks like this:
$(function() {
$('#ds_showcase').showcase({
linksOn: 'images',
css: {},
animation: { autoCycle: true, type: 'horizontal-slider', interval: 4000, stopOnHover:true, speed: 1500, easefunction: 'easeOutBounce'},
images: [
{ url: 'Showcase_ds_images/lift-truck.jpg ', description: 'Title 2', link: '', target: '_self' },
{ url: 'Showcase_ds_images/lifttruck2.jpg', description: 'Title 3', link: '', target: '_self' },
{ url: 'Showcase_ds_images/lift-truck3.jpg', description: 'Title 4', link: '', target: '_self' },
],
navigator: { position: 'bottom-right', orientation: 'horizontal', autoHide: false, showNumber: false,
css: { padding: '10px'},
item: { css: { height: '10px', width: '10px', backgroundColor: '#cccccc', borderColor: '#999999'},
cssHover: { backgroundColor: '#3399ff'},
cssSelected: { backgroundColor: '#3399ff', borderColor: '#3399ff'}
}
}
});
});