Search code examples
phpjquerymagentoflexsliderbitnami

Magento add Flexslider to homepage


I am using the Bitnami Magento https://bitnami.com/stack/magento stack and trying to add flexsliderto the homepage. I'm getting this error in my custom.js file:

SCRIPT438: Object doesn't support property or method 'flexslider'

for the Home Page I've added this to the CMS->Pages->Design-Custom Layout Design XML

<reference name="head"> 
    <action method="addCss"><stylesheet>css/flexslider.css</stylesheet></action>
    <action method="addJs"><script>jquery/jquery.min.js</script></action>
    <action method="addJs"><script>flexslider/jquery.flexslider-min.js</script></action>
    <action method="addJs"><script>flexslider/custom.js</script></action>
</reference> 

All the scripts are loading I've verified with the browser debugger console

This is the custom.js script

$.noConflict();

jQuery(window).load(function () {
    jQuery('.flexslider').flexslider();
});

This is in CMS->Pages->Content for the homepage

<div class="flexslider">
    <ul class="slides">
    <li><img src="Big.jpg" alt="" /></li>
    <li><img src="Big1.jpg" alt="" /></li>
    <li><img src="Big2.jpg" alt="" /></li>
    </ul>
</div>

Another interesting thing is that when I change the Custom Theme on the page design to anything else besides the rwd default it will load the slider correctly.


Solution

  • There is a slider that comes with the RWD theme and I am using that now. This article explains how to use it.

    http://www.creare.co.uk/new-features-magento-ce-1-9-responsive-theme#slider