jquery.uploadThumbs.jsという画像をアップロードする際にサムネイルを表示するスクリプトを利用したいのですが、
<table style="text-align:left;" border="1" cellpadding="2" cellspacing="2" id="tbl_image" class="tbl_info"> <tbody> <tr> <th>画像1</th> <td><input type="file" name="images[]" multiple="multiple" size="20" /></td> </tr> <tr> <th>画像2</th> <td><input type="file" name="images[]" multiple="multiple" size="20" /></td> </tr> </tbody> </table> <input type="button" id="add_image_table" value="追加する" /> <input type="button" id="del_image_table" value="削除する" /> の追加ボタンを押すと行が増えるスクリプトと連動ができません。 //ボタンを押すと行を追加する jQuery(function(){ jQuery('#add_image_table').click(function(){ var len = $("#tbl_image tbody").children().length; if(len > 10){ $("#add_image_table").attr("disabled","disabed"); } $('#tbl_image').append('<tr><th>画像' + (len + 1) + '</th><td><input type="file" name="images[]" multiple="multiple" size="20" /></td></tr>');}); jQuery('#del_image_table').click(function(){ if (jQuery('tbody tr').length) { jQuery('tbody tr:last').remove(); } });
});
どのようにしたら良いでしょうか?
教えて下さい。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。