首页
\
问答
\
如何使用jQuery UI选项卡将“选定”类添加到选定的选项卡锚点?(How to add a “selected” class to a selected tab anchor using jQuery UI Tabs?)
如何使用jQuery UI选项卡将“选定”类添加到选定的选项卡锚点?(How to add a “selected” class to a selected tab anchor using jQuery UI Tabs?)
我正在使用jQuery UI选项卡()。 它将“ui-tabs-selected”添加到选定的LI,但每个LI都有一个ID,因为它不同。 由于IE6中存在多个ID /类错误,我需要将“选定”类应用于“ui-tabs-selected”LI中的锚点。
有人能告诉我如何做到这一点?
I'm using jQuery UI tabs(). It adds "ui-tabs-selected" to the selected LI, but each LI has an ID because it's different. Due to the multi ID/class bug in IE6, I need to apply a "selected" class to the anchor that is inside the "ui-tabs-selected" LI.
Can someone tell me how to do this?
原文:https://stackoverflow.com/questions/5762152
更新时间:2023-01-24 12:01
最满意答案
尝试下面的代码(请参阅代码中的注释):
Option Explicit Sub TransferRows() Dim lLRow As Long With Sheets("Sheet1") lLRow = .Cells(.Rows.Count, 1).End(xlUp).Row With .Range("B1:C" & lLRow) .AutoFilter Field:=1, Criteria1:="Cat" .AutoFilter Field:=2, Criteria1:="dog" End With .Range("B2:C" & lLRow).SpecialCells(xlCellTypeVisible).EntireRow.Copy ' rest of your code goes here End With End Sub
Try the code below (see comments inside the code):
Option Explicit Sub TransferRows() Dim lLRow As Long With Sheets("Sheet1") lLRow = .Cells(.Rows.Count, 1).End(xlUp).Row With .Range("B1:C" & lLRow) .AutoFilter Field:=1, Criteria1:="Cat" .AutoFilter Field:=2, Criteria1:="dog" End With .Range("B2:C" & lLRow).SpecialCells(xlCellTypeVisible).EntireRow.Copy ' rest of your code goes here End With End Sub
相关问答
更多-
尝试下面的代码(请参阅代码中的注释): Option Explicit Sub TransferRows() Dim lLRow As Long With Sheets("Sheet1") lLRow = .Cells(.Rows.Count, 1).End(xlUp).Row With .Range("B1:C" & lLRow) .AutoFilter Field:=1, Criteria1:="Cat" .AutoFilter Field:=2, ...
-
我打破了步骤: df[['String1', 'String2', 'String3']]=(df[['Prod1', 'Prod2', 'Prod3']]!='') df1=df[['String1', 'String2', 'String3']].replace({False:np.nan}).stack().to_frame() df1[0]=df[['X1','X2']].replace({'':np.nan}).stack().values df[['String1', 'String2', 'S ...
-
根据2个匹配列在2个Excel列表中查找匹配的行(Find matching rows in 2 excel lists based on 2 matching columns)[2023-01-06]
连接然后匹配。 也就是说,使用公式在第一个表中创建一个隐藏列(例如,列D) =A2 & "##" & C2 然后,要查找,请使用连接字符串作为查找参数,并查看连接列。 就像是: =IF(ISNA(MATCH(E2&"##"&G2, $D$2:$D$4, 0)), FALSE, TRUE) 如果您不想在此中间计算中使用额外的列,请查看使用数组公式。 Concatenate and then match. That is, make a hidden column (say, column D) in yo ... -
看看这是否适合你 Sub sample() Dim sh1 As Worksheet Dim sh2 As Worksheet Dim sh3 As Worksheet Dim rngLookupValues As Range Dim rngHeaders As Range Dim cValue As Range Dim rngCellsToCopy As Range Dim lngColumnToCopy As Long Dim lngCurFirstEmptyColumn As Long Set sh ...
-
复制/粘贴方法应放在两个对应于两个参数的循环中:要复制的行数和每行的复制数。 对于以下代码,您可以通过注释和取消注释计算iCopyRow参数的两行来选择以111222333格式或123123123格式进行复制。 Sub CopyJournalLines2() Dim wsInv As Worksheet Dim i As Integer Dim j As Integer Dim iStartRow As Integer Dim iNumCopies As Intege ...
-
我认为缓慢的是多重复制和粘贴,你可以一次性完成。 此外,如果您只检查第4列 ,那么只需在那里循环。 另一个重要的事情是您复制后无法删除该行。 行将移动,然后您将无法获得预期的结果。 尝试先获取这些行,然后在完成迭代后一次删除。 尝试一些更清洁和直接的东西: 编辑1:在查看您的代码后,您似乎正在尝试将重复项组合在同一行中。 Sub CombineRows() Dim RowNum As Long, LastRow As Long Dim c As Range, rngtodelete As R ...
-
for i = FirstRowA to LastRowA 'leaving you to figure out how to find these values If cell(i) <> vbNullString Then for h = FirstRowB to LastRowB 'again for you to figure out If cell(h) = cell(i) Then cell(h ...
-
Range对象的AdvancedFilter方法可能是最有效的......并且它绝对不需要复制完整的行。 您可以选择所需的列。 但是,我重构了您的代码,而没有使用AdvancedFilter。 这应该快得多: Sub Join_(CI, FI, FSD) Dim a&, b&, LastRow&, v LastRow = Fcst_Cust.[a1048576].End(xlUp).Row + 1 a = 3 b = 2 With Raw_IFcst ...
-
Dim i As Long: i = 6 Dim r as Range Do While Cells(i, "C").Value <> "" If Cells(i, "C").Value = "9/12/2015" And Cells(i, "E").Value = "9/13/2015" Then if r is nothing then set r = Cells(i, "M") else set r = application.union(r, Cells ...
-
复制并粘贴数据匹配(Copy And Paste Data Matching)[2022-04-02]
你可以走另一条路: Option Explicit Sub main() Dim hedaerCell As Range Dim labelsArray As Variant With ThisWorkbook.Worksheets("Sheet02") '<--| reference your "headers" worksheet For Each hedaerCell In .Range("A1:J1") '<--| loop through all "he ...