1

我有一个简单的愿望..从另一个..添加到一个可滚动的..所以这意味着添加这里的文档很容易..但是删除..没有运气..我可以移动但可滚动不反映在导航或左权利中..这是我迄今为止尝试过的..

    $(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");
    });

和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>

我确定这很简单.. 一些解决方法.. 只是还没有找到或得到它:D 感谢您的帮助.. Cheers-Jeremy

4

0 回答 0