English 中文(简体)
页: 1
原标题:table is breaking -jQuery

I have a table, now on load i am hiding few last rows.Now on click of a span it will expand (last few rows)and collapse.I am using Slidetoggle(), and its working fine in IE, but the problem is its breaking in FF, first few rows are breaking in FF.how to fix this?any suggestion? EDIT:

$("tr").slice(index).slideToggle( slow )//this works fine in IE but in FF, the first few rows became right-aligned, thus breaking the table layout, this can be fixed using dispaly:""..something like 
$("tr").slice(index).css("dispaly","").. 

but I am using slidetoggle(). so facing the issue EDIT: HTML:

enter code here <div>
<table>
    <tr>
        <td>
            td1
        </td>
        <td>
            td11
        </td>
        <td>
           td111
        </td>
    </tr>
    <tr>
        <td>
            td2
        </td>
        <td>
            td22
        </td>
        <td>
             td222
        </td>
    </tr>
    <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>
       <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>
       <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>
       <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>
       <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>
       <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>   <tr>
        <td>
            td3
        </td>
        <td>
            td33
        </td>
        <td>
            td333
        </td>
    </tr>
</table>

最佳回答

除了调查表中的javascript外,提供表格的超文本将进一步澄清,但问题可能与以下网站有关:

So one work around is to dynamically wrap each innerHTML of each TD with a DIV as shown here:
jQuery slideToggle doesn t work with colspan in Firefox?

You could also experiment with re-setting the colspan:
td colspan does not work while using jquery show/hide()

问题回答

暂无回答




相关问题
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.

热门标签