Jquery get value of hiddenfield after checkbox is checked

I have a gridview with two columns a data column and checkbox.  Hidden in the checkbox column are three asp:label controls retrieving various values on databind.  Immediately after the checkbox control exist a label control that retrieves sales price data.  When the checkbox is checked I call a jquery function that is suppose to get the next item (that being the 'sales price' control) but I keep retrieving an empty string.  

Next or Next All don't seem to be working.  I even a class parameter to the control in question, which produces the same result.

Not sure what I'm doing wrong please find cold below.

jquery:
   
    //This section contains scripts that calculate the Suggested Sales Price for the Items Checked in Gridview
        $(document).ready(function () {
            $('.checkBox').click(function () {
                var salePrice = 0.00;
                var cbSalePrice;
                $("[id^=<%=OutfitGV.ClientID %>]:checkbox").each(function () {
                    cbSalePrice = $(this).next('.saleCostHiddenField').text();
                    alert("sale Price " + parseFloat(cbSalePrice));
                    salePrice = salePrice + parseFloat(cbSalePrice);
                });
                //Populate Suggest Cost Field
                $("#<%= SuggestedSaleCostTB.ClientID %>").val(salePrice.toFixed(2));
            }); //End of Class checkbox click listener

        });

Open in new window


aspx:
                            <asp:GridView ID="OutfitGV" runat="server" AutoGenerateColumns="False"   Width="100%" EmptyDataText= "No Records to Display"
                                AlternatingRowStyle-BackColor="#e1e1e1" AlternatingRowStyle-ForeColor="#000000" AlternatingRowStyle-Font-Size="Smaller"  
                                HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="Small" HeaderStyle-BackColor="#333333" HeaderStyle-ForeColor="White"  
                                RowStyle-Font-Size="Smaller" RowStyle-BackColor="#ffffff" ShowHeader="false" PageSize="10">
                                <Columns>
                                    <asp:TemplateField HeaderText="Name">
                                        <ItemTemplate >
                                            <asp:HyperLink ID="OutfitLink" runat="server" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "RecordID")%>' 
                                            Text='<%# DataBinder.Eval(Container.DataItem, "ItemName")%>'  style="color:#000;"></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox id="cbSelector" runat="server" CssClass="checkBox"  />
                                        <asp:Label ID="cbSalePriceLbl" runat="server"  Text='<%# Eval("SalePrice") %>' CssClass="saleCostHiddenField" style="display: none;" />
                                        <asp:Label ID="cbIDLbl" runat="server" Text='<%# Eval("RecordID") %>' style="display: none;" />
                                        <asp:Label ID="cbItemNameLbl" runat="server" Text='<%# Eval("ItemName") %>' style="display: none;" />
                                        
                                    </ItemTemplate>
                                </asp:TemplateField>
                                </Columns>
                            </asp:GridView>

rendered content:
<td>
                                        <span class="checkBox"><input id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbSelector" type="checkbox" name="ctl00$CenterPieceHolder$OutfitGV$ctl02$cbSelector" /></span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbSalePriceLbl" class="saleCostHiddenField" style="display: none;">7.0000</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbIDLbl" style="display: none;">1</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbItemNameLbl" style="display: none;">Men's Stone Washed Jeans</span>
                                        
                                    </td>

Open in new window

Robert TreadwellManaging DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Can you post the rendered HTML not the aspx code
0
Robert TreadwellManaging DirectorAuthor Commented:
The rendered code :

<table cellspacing="0" rules="all" border="1" id="ctl00_CenterPieceHolder_OutfitGV" style="width:100%;border-collapse:collapse;">
			<tr style="background-color:White;font-size:Smaller;">
				<td>
                                            <a id="ctl00_CenterPieceHolder_OutfitGV_ctl02_OutfitLink" href="1" style="color:#000;">Men's Stone Washed Jeans</a>
                                        </td><td>
                                        <span class="checkBox"><input id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbSelector" type="checkbox" name="ctl00$CenterPieceHolder$OutfitGV$ctl02$cbSelector" /></span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbSalePriceLbl" class="saleCostHiddenField" style="display: none;">7.0000</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbIDLbl" style="display: none;">1</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl02_cbItemNameLbl" style="display: none;">Men's Stone Washed Jeans</span>
                                        
                                    </td>
			</tr><tr style="color:Black;background-color:#E1E1E1;font-size:Smaller;">
				<td>
                                            <a id="ctl00_CenterPieceHolder_OutfitGV_ctl03_OutfitLink" href="4" style="color:#000;">Men's Four Button Jacket</a>
                                        </td><td>
                                        <span class="checkBox"><input id="ctl00_CenterPieceHolder_OutfitGV_ctl03_cbSelector" type="checkbox" name="ctl00$CenterPieceHolder$OutfitGV$ctl03$cbSelector" /></span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl03_cbSalePriceLbl" class="saleCostHiddenField" style="display: none;">30.0000</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl03_cbIDLbl" style="display: none;">4</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl03_cbItemNameLbl" style="display: none;">Men's Four Button Jacket</span>
                                        
                                    </td>
			</tr><tr style="background-color:White;font-size:Smaller;">
				<td>
                                            <a id="ctl00_CenterPieceHolder_OutfitGV_ctl04_OutfitLink" href="5" style="color:#000;">Men's Black Loffer</a>
                                        </td><td>
                                        <span class="checkBox"><input id="ctl00_CenterPieceHolder_OutfitGV_ctl04_cbSelector" type="checkbox" name="ctl00$CenterPieceHolder$OutfitGV$ctl04$cbSelector" /></span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl04_cbSalePriceLbl" class="saleCostHiddenField" style="display: none;">25.0000</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl04_cbIDLbl" style="display: none;">5</span>
                                        <span id="ctl00_CenterPieceHolder_OutfitGV_ctl04_cbItemNameLbl" style="display: none;">Men's Black Loffer</span>
                                        
                                    </td>
			</tr>

Open in new window

0
GaryCommented:
Change
cbSalePrice = $(this).next('.saleCostHiddenField').text();
to
cbSalePrice = $(this).parent('span').next('.saleCostHiddenField').text();
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.