English 中文(简体)
删除表行
原标题:delete table row with effect
最佳回答

The jump you mentioned happens because first column shrinks when longer text "Radiohead" is removed and shorter text "U2" is the only factor defining the cell width in the first column. This problem can be solved by having fixed column widths in your table.

问题回答

I would suggest to make it with only div s and not with a table.. then u can do it easly like:

<style>
    .row {
        float: left;
        width: 990px;
        overflow: hidden;
    }
        .row  .col {
            float: left;
            width: 490px;
        }
            .row  .col.first {
                width: 200px;
            }
            .row  .col.last {
                width: 300px;
            }

</style>

<script type="text/javascript">
    [...]
    SF.deleteRow = function(selector) {
        $(selector)
            .find( .row )
            .animate({ height: 0 },"fast", "linear", function() {
                $(this).remove();
            });
    };
    [...]
</script>

<div class="row even">
    <div class="col first">[....]</div>
    <div class="col">[....]</div>
    <div class="col last">[....]></div>
</div>
<div class="row odd">
    <div class="col first">[....]</div>
    <div class="col">[....]</div>
    <div class="col last">[....]></div>
</div>
<div class="row even">
    <div class="col first">[....]</div>
    <div class="col">[....]</div>
    <div class="col last">[....]></div>
</div>
<div class="row even">
    <div class="col first">[....]</div>
    <div class="col">[....]</div>
    <div class="col last">[....]></div>
</div>

这只是一个例子。 由于在<代码>上出现超支, 阶级是隐蔽的,当高点为0时,就会显示任何情况。

If you just wanna use a table it will be a little bit harder!

答案只是建议使用四舍五入而不是表。 i 还要使用浮标,因为其更容易对当时未变物体的成分进行估算(我的意见)。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签