Created
June 1, 2013 02:55
-
-
Save ituki/5689135 to your computer and use it in GitHub Desktop.
横並びしてる要素の高さをそろえ、要素が削除されたあともまた高さをそろえる ref: http://qiita.com/items/ddbf2dc96e6e746a8c1f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="box01" class="clearfix"> | |
<li> | |
<p class="text">ダミーダミーダミー</p> | |
<p><a href="#">削除ボタン</a></p> | |
</li> | |
<li> | |
<p class="text">ダミーダミーダミーダミーダミーダミーダミーダミーダミーダミーダミーダミーダミーダミー</p> | |
<p><a href="#">削除ボタン</a></p> | |
</li> | |
<li> | |
<p class="text">ダミーダミーダミーダミーダミーダミーダミーダミー</p> | |
<p><a href="#">削除ボタン</a></p> | |
</li> | |
<li> | |
<p class="text">ダミーダミーダミーダミーダミーダミーダミーダミー</p> | |
<p><a href="#">削除ボタン</a></p> | |
</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function heightchange() { | |
$('#box01 p.text').tile(2); | |
} | |
heightchange(); | |
$('#box01 a').click(function(){ | |
$(this).closest('li').remove().queue( function(){ heightchange(); }); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment