I have the code for a jQuery image slider that pulls from a directory. My client will just be dropping in images into the folder and deleting them without my knowledge. Right now it requires I put in a number (under 'numslides') for how many slides they'll have. With it constantly changing what value do I put it?
(function($){
var directorySlider = function(element, options)
{
var elem = $(element),
obj = this,
elemId = elem[0].id;
// Merge config settings
var config = $.extend({
animation: 'fade',
filebase: 'slide_',
extension: 'jpg',
speed: 1000,
timeout: 4000,
directory: '/path/images/',
numslides: 3,
height: 778,
width: 448
}, options || {});
This is the PHP code on my page:
$(document).ready(function(){
$('.directorySlider').directorySlider();
});
Someone suggested this code below and the top code is what's in my js file. How would I implement this:
$.get('numberoffiles.php', function(data) {
alert(data);
});