Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

January 04, 2016

Javascript URL parse

Javascript URL parse

window.location.host : example.com:80
window.location.hostname : example.com
window.location.protocol : http:
window.location.port : 8080 or 80
window.location.origin : http://example.com *

December 20, 2014

Magento add Custom js/css in Current Theme

Add Custom JS/CSS in current theme


If you want the css and js for all the pages then you can add the code in local.xml with default handles xml tag.
 
   
     
       
         
       
       
         [css_filename.css]
       
     
   
 
[script_filename.js] - specify the script filename
[css_filename.css] - specify the css filename

For specific pages you want to add the custom css or js, then
specify the handles in local.xml and add the custom css, js xml code.

And also if want to add the custom css in specific handles,
then add the custom add code within that handles.