I have a simple want.. to add to a scrollable from another.. so that means a add which was easy with the docs here.. but the remove.. no luck.. I can make the move but the scrollable doesn't reflect in in the nav or left rights.. this is what I have tried so far..
$(function() {
// initialize scrollable
$("#Unused.scrollable").scrollable({easing: 'easeOutBack'});
$("#Unused.scrollable").navigator();
$("#Used.scrollable").scrollable({easing: 'easeOutBack'});
$("#Used.scrollable").navigator();
$(".scrollable input[type='checkbox']").live('click',function(){
var package=$("input[name='multiInput-module-0-Selected']").val();
$("input[name='multiInput-module-0-Selected']").val('');
$(this).closest('.scrollable').find("input[type='checkbox']").each(function(index, Element) {
if($(this).attr("checked")==true){
if(package==''){var c=''}else{var c=','}
package+=c+$(this).val();
}
});
var api = $("#Used.scrollable").data("scrollable");
api.addItem($(this).closest('.img').clone()).end();
$(this).closest('.img').remove();
$("#Unused.scrollable").removeData();
$("#Unused.scrollable").scrollable().navigator();
$("input[name='multiInput-module-0-Selected']").val($.trim(package));
});
$("ul.tabs").tabs("div.panels > div.panel");
});
and the html
<ul class="tabs">
<li><a href="#">Used images</a></li>
<li><a href="#">Add an image</a></li>
</ul>
<div class="panels">
<div class='panel'>
<h2>Used</h2>
<div class="navi" ></div>
<a class="prev browse left"></a>
<div id='Used' class="scrollable">
<div class="items">
<div class='img' >
<input type='checkbox' value='/uploads/siteTheme/headerimages/1.jpg' checked='checked'/>
<a href='#' class='addtext' style=''>T</a> <img src='http://localhost/www.glts.tec.ma.us/uploads/SuperSizerTmp/admin/headerimages/1.-w100-h0-p0-q85-F-----S1-c.jpg?1296899993' alt='' /> </div>
<div class='img' >
<input type='checkbox' value='/uploads/siteTheme/headerimages/2.jpg' checked='checked'/>
<a href='#' class='addtext' style=''>T</a> <img src='http://localhost/www.glts.tec.ma.us/uploads/SuperSizerTmp/admin/headerimages/2.-w100-h0-p0-q85-F-----S1-c.jpg?1296899993' alt='' /> </div>
<!-- "next page" action -->
<a class="next browse right"></a> </div>
<div class='panel'>
<h2 style='clear:both;'>Unused</h2>
<div class="navi" ></div>
<!-- "previous page" action -->
<a class="prev browse left"></a>
<!-- root element for scrollable -->
<div id='Unused' class="scrollable">
<!-- root element for the items -->
<div class="items">
<div class='img' >
<input type='checkbox' value='/uploads/siteTheme/headerimages/1 - Copy.jpg' />
<img src='http://localhost/www.glts.tec.ma.us/uploads/SuperSizerTmp/admin/headerimages/1 - Copy.-w100-h0-p0-q85-F-----S1-c.jpg?1296900411' alt='' /> </div>
<div class='img' >
<input type='checkbox' value='/uploads/siteTheme/headerimages/2 - Copy.jpg' />
<img src='http://localhost/www.glts.tec.ma.us/uploads/SuperSizerTmp/admin/headerimages/2 - Copy.-w100-h0-p0-q85-F-----S1-c.jpg?1296900411' alt='' /> </div>
</div>
</div>
<!-- "next page" action -->
<a class="next browse right"></a> </div>
<div style='clear:both;'></div>
</div>
I'm sure it's something simple.. some workaround.. just not finding it or getting it yet :D thanks for the help.. Cheers-Jeremy