last day (17 days later) » 

11:22 PM
1
A: Slidetoggle is not working correctly on click

Alessandro Marchisiotry $(document).ready(function () { $('.shipToMultipleLink').click(function () { $('.shipToMultipleSection, .shipToSingleSection').slideToggle('fast'); return false; }); $.each($('.shipToMultipleSection .shoppingCart_qty-select'), function ...

 
It is closer, I updated the original comment with sample of how it should work/ look. Thank you very much for your help.
 
Hi Alessandro, it is ok. The line totals are backwards, and the default to be displayed should be the grouped totals. Is it hard to show single line for grouped data, multiple lines for details, and show grouped line as default? Many thanks sir.
What you did is great, is just that is backwards, not at the div level, but at the table level.
 
fantastico! molto grazie Alessandro!
 
11:22 PM
Dont forget rate the answer ;-)
 
Hi Alessandro, I just ran into an issue with your solution. When there are multiple single items like box 1, box 2, box 3, the single line row only captures the values for box 1.
 
the grouped lines show correct, but the detail lines do not show the correct quantities for box #2. thank you
 
yes, jsfiddle.net/alemarch/k3t0cbcc/13 but is an example.. i think that the html code is generated for you..js only read and group what read inner html tag
 
sorry my bad, i see what you did. it seems to work good.
I am getting an error when I plug your code in: TypeError: $(...).children(...).html(...) is undefined h += '<td>' + $(this).children('.shoppingCart_Price_Each').html().replace(/Each/... it points to this part: $(this)
I think I got it, my real html structure is a bit different that the one used in the fiddle.
Alessandro. I got it to work for the single but for the multiple, only for the shoppingCart_Box class. The html is different on the real page and it does not recognize the class for the Each column. This is how my html looks: <div class="shoppingCartPrice"><div class="shoppingCart_Price_Each">Each $26.99</div><div class="shoppingCart_SubTotal_Each">Price $26.99</div></div>
It works for the single line using children, but for the multiple line display, the each and price are not working. The description and quantity does work.
I tried without luck, this: h += '<td>' + $('.shoppingCartPrice').parent().next('.shoppingCart_Price_Each').html().replace‌​‌​(/Each/, "") + '</td>'
I was able to fix the code to make it work with the correct markup structure and classes for the display of grouped line table
 
11:24 PM
put your output in a new jsfiddle
 
I am still struggling to make it work for the multiple lines table display. I was able to figure out the column for Box and Qty, but the Each is tough
 
but in the example each is always one, is correct?
 
each is always the price for a single box/item
the html output for that column is
    <div class="shoppingCartPrice">
            <div class="shoppingCart_Price_Each">Each $26.99</div>
            <div class="shoppingCart_SubTotal_Each">Price $26.99</div>
    </div>
in the fiddle we have been using as example that column html is different
            <div class="shoppingCart_Price_Each">Each 26.99</div>
            <div class="shoppingCart_SubTotal_Each">Price 134.95</div>
 
now i must ho out, send me your jsfiddle with the real output..
all output of one shopping
i'll see after
 
ok
send it thought this chat?
 

  last day (17 days later) »