Created
          September 13, 2011 11:43 
        
      - 
      
 - 
        
Save genee19/1213646 to your computer and use it in GitHub Desktop.  
    Adds class with category ID into div.ecwid-productBrowser so various CSS customizations can be targeted to products in some particular category
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Ecwid.OnAPILoaded.add(function(){var a;a=window.document.getElementById("ProductBrowser-1");window.Ecwid.ProductBrowser.element=a.getElementsByClassName&&a.getElementsByClassName("ecwid-productBrowser")[0]||function(){var b,c;c=/(^| )ecwid-productBrowser( |$)/;for(b in a.getElementsByTagName("div"))if(b.className.match(c))return b}()});Ecwid.OnPageLoaded.add(function(a){if(a.type==="PRODUCT")window.Ecwid.ProductBrowser.element.className+=" ecwid-productBrowser-ProductInCategory-"+a.categoryId}); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment