Hi;
I want to make, put images in to the slider after images uploading. But only reading first working code. It has two li elements and show this. li elements increasing after uploading
This code easysliders code. I am giving manuel s variable value, for example 100. Not have a problem after this. How set automatic value for s variable after uploading?.
- <div id="container">
<div id="content">
<div id="slider">
<ul>
<li><a href="http://templatica.com/preview/30"><img src="./img/01.jpg" alt="Css Template Preview" /></a></li>
<li><a href="http://templatica.com/preview/30"><img src="./img/01.jpg" alt="Css Template Preview" /></a></li>
</ul>
</div>
</div>
</div> - var uploader = $('#flashUploader').pluploadQueue();
uploader.bind('FileUploaded', function(up, file, response) {
var obj = jQuery.parseJSON(response.response);
$('#slider ul').append("<li id="+obj.ramdom+"><img src='http://www.smyrnart.com/upl/" + obj.file + "'></li>")
$("#slider").easySlider({
a : $("#slider ul li").length
});
});
- this.each(function() {
var obj = $(this);
var s = options.a;
alert(s);
var w = $("li", obj).width();
var h = $("li", obj).height();
obj.width(w);
obj.height(h);
obj.css("overflow","hidden");
var ts = s-1;
var t = 0;
$("ul", obj).css('width',s*w);
if(!options.vertical) $("li", obj).css('float','left');
if(options.controlsShow){
var html = options.controlsBefore;
if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';
html += options.controlsAfter;
$(obj).after(html);
};
$("a","#"+options.nextId).click(function(){
animate("next",true);
});
$("a","#"+options.prevId).click(function(){
animate("prev",true);
});
$("a","#"+options.firstId).click(function(){
animate("first",true);
});
$("a","#"+options.lastId).click(function(){
animate("last",true);
});
function animate(dir,clicked){
var ot = t;
switch(dir){
case "next":
t = (ot>=ts) ? (options.continuous ? 0 : ts) : t+1;
break;
case "prev":
t = (t<=0) ? (options.continuous ? ts : 0) : t-1;
break;
case "first":
t = 0;
break;
case "last":
t = ts;
break;
default:
break;
};

Thanks for Answers.