javascript - magento xml for 1 cms page - js and css -


i trying add accordion 1 cms page in xml update.

i uploaded default > default/js/ac/ , /css/ac/

and placed code in xml update pane this:

<reference name="head"> <action method="additem">   <type>text/css</type>   <name>css/ac/jquery-accordion.css</name>   </action> <action method="additem">   <type>text/javascript</type>   <name>js/ac/jquery-1.10.1.min.js</name>   </action> <action method="additem">   <type>text/javascript</type>   <name>js/ac/jquery-accordion.js</name>   </action> </reference> <reference name="header">   <script type="text/javascript">     jquery(document).ready(function() {     $("#accordion").jqueryaccordion();     });     </script> </reference> 

the dev of code knows nothing mangento. says this:

  1. installation

place reference css , javascript files inside “head” section of page:

<link rel="stylesheet" type="text/css" href="jquery-accordion.css">  <script type="text/javascript" src="jquery-1.10.1.min.js"></script>  <script type="text/javascript" src="jquery-accordion.js"></script> 
  1. html markup

jquery accordion based in “div’s” , has fluid layout. take on accordion composed 2 items:

<div id="accordion" class="accordion">    <div class="accordion-item">          <div class="accordion-header">                <span class="title">header</span>          </div>          <div class="accordion-content">          </div>    </div>    <div class="accordion-item">          <div class="accordion-header">                <span class="title">header</span>          </div>          <div class="accordion-content">          </div>    </div> 

  1. put fallowing code inside head section of page:

      jquery(document).ready(function() {          $("#accordion").jqueryaccordion();    }); 

update: working ideas why font-awesome icons skewed?

solved: had change /* class: std - styles admin-controlled content * .std em { font-style:normal; }

as per hint default > default/js/ac/ , /css/ac/ try this.,

<reference name="head">       <action method="additem"><type>skin_js</type><name>js/ac/jquery-1.10.1.min.js</name></action>       <action method="additem"><type>skin_js</type><name>js/ac/jquery-accordion.js</name></action>       <action method="additem"><type>skin_css</type><name>css/ac/jquery-accordion.css</name></action>     </reference>     <reference name="header">        <script type="text/javascript">           jquery(document).ready(function() {               $("#accordion").jqueryaccordion();           });        </script>     </reference> 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -