9

In magento on cart page there is a javascript function call decorateTable('shopping-cart-table'). For what is used the function decorateTable?

asked Dec 10, 2013 at 9:46

1 Answer 1

13

The decorateTable function is used to add some classes on the tr and td elements of a table. Classes like odd even first last for the tr elements and last on the td elements. It's easier this way then to do it from PHP.
After adding these classes you can easily create css styles for each one of the added classes and make the table rows and columns stand out in the crowd.

answered Dec 10, 2013 at 10:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.