♥Tsimi Posted December 4, 2015 Posted December 4, 2015 Normal osC 2.3.4 -> inside the stylesheet.css there is this definition around line 90 .productListTable tr.alt td { background-color: #ecf6fc; } I know what it does and for what it is but looking at the product_listing.php file there is no such alt class. I used the "search in files" function in Notepad++ but could not find any hint that points to it's creation. The product_listing.php file has just a simple <tr> tag, no class, no nothing. Looking at the page with firebug it shows that every second row has such and alt tag. <tr class="alt"> So where is this coming from?
multimixer Posted December 4, 2015 Posted December 4, 2015 includes/footer.php <script type="text/javascript"> $('.productListTable tr:nth-child(even)').addClass('alt'); </script> My community profile | Template system for osCommerce - New: Responsive | Feedback channel
♥Tsimi Posted December 4, 2015 Author Posted December 4, 2015 Thanks George I also just found it. :thumbsup: Very special isn't it? Having something like that inside the footer? Or is it normal?
multimixer Posted December 4, 2015 Posted December 4, 2015 Well, it's normal to add/remove classes via js , also not strange to use inline js and to place that js somewhere downstairs the page The particular effect would be better done via css only, using nth-child() My community profile | Template system for osCommerce - New: Responsive | Feedback channel
♥Tsimi Posted December 4, 2015 Author Posted December 4, 2015 Yes of course. Sorry I meant adding such a small js code inside the footer and not template_bottom.php
Recommended Posts
Archived
This topic is now archived and is closed to further replies.