javascript - Add <style> and <script> in Magento static block -
i have static block (identifier mega_menu
)
it has code this:
<ul class="dropdown-menu" role="menu"> <li data-submenu-id="submenu-patas"> <div id="submenu-patas" class="popover"> <h3 class="popover-title">patas</h3> <div class="popover-content"><img src="img/patas.png"></div> </div> </li> <li data-submenu-id="submenu-snub-nosed"> <div id="submenu-snub-nosed" class="popover"> <h3 class="popover-title">golden snub-nosed</h3> <div class="popover-content"><img src="img/snub-nosed.png"></div> </div> </li> </ul>
in normal html file (from got code) there styles , it's references this:
<link href="css/bootstrap.css" rel="stylesheet"> --<--reference <style> body { padding-top: 60px; } </style> <link href="css/bootstrap-responsive.css" rel="stylesheet"> --<--reference <style> .navbar .popover { width: 400px; -webkit-border-top-left-radius: 0px; -webkit-border-bottom-left-radius: 0px; border-top-left-radius: 0px; border-bottom-left-radius: 0px; overflow: hidden; } </style>
and scripts , it's references this:
<script src="../jquery.menu-aim.js" type="text/javascript"></script> --<reference <script src="js/bootstrap.min.js" type="text/javascript"></script> --<--reference <script> var $menu = $(".dropdown-menu"); . . . $(document).click(function() { // hide submenu on click. again, hacked // menu/submenu structure show use of jquery-menu-aim. $(".popover").css("display", "none"); $("a.maintainhover").removeclass("maintainhover"); }); </script>
so question is:
can these styles , scripts directly in static block?
if no how can add these styles , script work particular static block (e.g. mega_menu
here)?
ps: magento noob here
call phtml file static block
{{block type="core/template" template="page/html/your_file_name.phtml"}}
and write code in your_file_name.phtml
Comments
Post a Comment