You must Sign In to post a response.
  • Category: JQuery

    Firefox Issue

    I am unable to get the lenth of $('a.aheadcss'). Since in my first group "Group Name 1" I have an extra unwanted <a> tag inserted somehow. "Group Name 2" is perfect. Why is it that I have this extra tag inserted only in FireFox. This happens only inside my project environment. Would there be something got to do with the cache.

    It's still the same when I press Ctrl + F5.


    <ul id="ul1">
    <li id="liGroupTotals" runat="server"><span>Group Totals:</span> <a style="text-decoration: underline;
    color: #265ec3; font-weight: bold; cursor: pointer;" class="btn-slide">Click Here</a>
    <div id="output" style="display: none; background-color: #e4e9dc; color: Black; position: absolute;
    width: 260px;">
    </div>
    </li>

    </ul>
    <div>
    <ajax:Accordion ID="MyAccordion" runat="Server" SelectedIndex="0" HeaderCssClass="accordionHeader"
    HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
    AutoSize="None" FadeTransitions="true" TransitionDuration="250" FramesPerSecond="40"
    RequireOpenedPane="false" SuppressHeaderPostbacks="true">
    <HeaderTemplate>
    <div href="#" id='<%# Eval("Key") %>' class="accordionLinkOrderForm">
    <table style="width:75%">
    <tr align="center">
    <td style="width: 25%; text-align:right; ">
    <%# Eval("Key")%>
    </td>

    </tr>
    </table>
    </div>
    </HeaderTemplate>
    <ContentTemplate>
    <a class="aheadcss" id='<%# Eval("Key") %>'>
    <asp:ListView ID="lvOrderHistory" runat="server" OnItemDataBound="lvOnItemDataBound"
    DataSource='<%# Eval("Values") %>'>
    <LayoutTemplate>
    <table id="Table1" runat="server" border="0" cellpadding="0" cellspacing="1">
    <tr id="itemPlaceHolder" runat="server">
    </tr>
    </table>
    </LayoutTemplate>
    <ItemTemplate>
    <tr id="Tr2" runat="server" class="lvRow">
    <td class="tdOrderForm1">
    <asp:Label ID='CustomerItemNumber' Text='<%# Eval("CustomerItemNumber")%>'
    runat="server"> </asp:Label>
    </td>
    <td class="tdOrderForm2">
    <asp:Label ID='ItemNumber' Text='<%# Eval("ItemNumber")%>' runat="server"> </asp:Label>
    </td>
    <td class="tdOrderForm3">
    <asp:Label ID='ItemDescription' Text='<%# Eval("ItemDescription")%>' runat="server"> </asp:Label>
    </td>
    </tr>

    </ItemTemplate>
    <AlternatingItemTemplate>
    <tr id="Tr3" runat="server" class="lvRowAlternate">
    <td class="tdOrderForm1">
    <asp:Label ID='CustomerItemNumber' Text='<%# Eval("CustomerItemNumber")%>'
    runat="server"> </asp:Label>
    </td>
    <td class="tdOrderForm2">
    <asp:Label ID='ItemNumber' Text='<%# Eval("ItemNumber")%>' runat="server"> </asp:Label>
    </td>
    <td class="tdOrderForm3">
    <asp:Label ID='temDescription' Text='<%# Eval("ItemDescription")%>' runat="server"> </asp:Label>
    </td>
    </tr>

    </AlternatingItemTemplate>
    </asp:ListView>
    </a>
    </ContentTemplate>
    </ajax:Accordion>
    </div>
    <script type="text/javascript">
    $(document).ready(function() {
    alert($('.aheadcss').length);
    $('.aheadcss').each(function() {
    alert($(this).attr("id"));
    if ($(this).hasClass("extdPrice")) {
    alert($(this).attr('id'));
    }
    });
    $('.btn-slide').click(function(e) {

    htmlToDisplay = "";
    $('.aheadcss').each(function() {
    htmlToDisplay = htmlToDisplay + " " + $(this).attr("id") + "<br />";
    });

    $("div#output").slideToggle("slow");
    $(this).toggleClass("active");
    $('div#output').html(htmlToDisplay);
    });
    });
    </script>




    <div id="ctl00_MainPlaceHolder_MainControl_MyAccordion" style="height: auto; overflow: auto;">
    <input type="hidden" value="-1" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_AccordionExtender_ClientState" name="ctl00$MainPlaceHolder$MainControl$MyAccordion_AccordionExtender_ClientState" />
    <div class="accordionHeader" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_header">

    <div class="accordionLinkOrderForm" id="Group Name 1" href="#">
    <table style="width: 75%;">
    <tbody>
    <tr align="center">
    <td style="width: 35%; text-align: right;">
    Group Name 1
    </td>
    </tr>
    </tbody>
    </table>
    </div>

    </div>
    <div style="height: 0px; overflow: hidden; display: none; opacity: 0;">
    <div style="display: block; height: auto; overflow: hidden;" class="accordionContent" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_content">
    <a id="Group name 1" class="aheadcss"></a>
    <table cellspacing="1" cellpadding="0" border="0" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_content_lvOrderHistory_Table1">
    <tbody>
    <tr class="lvRow" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_content_lvOrderHistory_ctrl0_Tr2">
    <td >
    <span id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_content_lvOrderHistory_ctrl0_CustomerItemNumber">1234</span>
    </td>
    <td >
    <span id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_content_lvOrderHistory_ctrl0_ItemNumber">11112</span>
    </td>
    <td >
    <span id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_0_content_lvOrderHistory_ctrl0_ItemDescription">BIRTHDAY CAKE</span>
    </td>
    </tr>
    </tbody>
    </table>
    <a id="Group Name 1" class="aheadcss"></a>
    </div>
    </div>
    <div class="accordionHeader" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_header">
    <div class="accordionLinkOrderForm" id="Group Name 2" href="#">
    <table style="width: 75%;">
    <tbody><tr align="center">
    <td style="width: 35%; text-align: right;">
    Group Name 2
    </td>

    </tr>
    </tbody>
    </table>
    </div>
    </div>
    <div style="height: 0px; overflow: hidden; display: none; opacity: 0;">
    <div style="display: block; height: auto; overflow: hidden;" class="accordionContent" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_content">
    <a id="Group Name 2" class="aheadcss">
    <table cellspacing="1" cellpadding="0" border="0" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_content_lvOrderHistory_Table1">
    <tbody>
    <tr class="lvRow" id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_content_lvOrderHistory_ctrl0_Tr2">
    <td >
    <span id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_content_lvOrderHistory_ctrl0_CustomerItemNumber">23556</span>
    </td>
    <td >
    <span id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_content_lvOrderHistory_ctrl0_ItemNumber">33333</span>
    </td>
    <td >
    <span id="ctl00_MainPlaceHolder_MainControl_MyAccordion_Pane_1_content_lvOrderHistory_ctrl0_ItemDescription">ICE CREAM</span>
    </td>
    </tr>
    </tbody>
    </table>
    </a>
    </div>
    </div>
    </div>



    Thanks for your help,
  • #508504
    Thanks,

    I used a <div> instead of the <a> tag. It works great now on FireFox ,IE, Chrome and Safari.

    thanks


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.