Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Phil Ewels

    (@tallphil)

    Hi Shaun,

    A look at the Chrome developer console on your site shows the error Uncaught TypeError: undefined is not a function coming from theme.js, line 4. That’s this code:

    $('.dropdown').on('show.bs.dropdown', function(e){

    WordPress sites run jQuery in a so called “no-conflict” mode, where the dollar symbol isn’t used. As such, javascript doesn’t recognise the $( and breaks. This haults the execution of all javascript on the page, including the carousel.

    You can either do a find and replace, switching $( for jQuery(, or you can wrap your code so that the dollar signs work. See this WordPress docs page for more information.

    Hope that helps! Nice site, looks good! ??

    Phil

    Thread Starter [email protected]

    (@shaunloveideecom)

    Hi Phil,

    Thanks and thank you for the quick reply ??

    I’ve removed the contents of this .js file as it was just something I was trying out for the dropdown menu, so unrelated to the slider on the homepage. So not the theme.js file is empty

    Does the fix still apply? I’ve searched bootstrap.min.js (the only other .js doc I have) for $( but there’s not an instance of $( in there, so I’m not sure what to do…

    Apologies, I’m pretty new to js.

    Thanks again,

    Shaun.

    Plugin Author Phil Ewels

    (@tallphil)

    Ah ok, this is a more complicated problem – the carousel is now sort of working (the images swap when you click the arrows), but don’t animate. This is usually due to some kind of Javascript conflict or something.

    No easy answer this time sorry – I’d try removing all other javascript includes from your pages apart from jQuery and bootstrap and seeing if it works. Then, add them back one at a time.

    The markup looks right anyway, so I think the plugin is working. If in doubt try posting on stack overflow or somewhere – many minds are better than my one ??

    Good luck!

    Phil

    Thread Starter [email protected]

    (@shaunloveideecom)

    Hey Phil,

    Thanks for the point in the right direction! It turned out the ‘Bootstrap Shortcodes’ plugin was conflicting with the carousel plugin. So removing this shortcodes plugin and replacing it with another (very similar) shortcodes plugin has done the trick.

    Thanks again for all of your help and love he carousel plugin!

    Shaun.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Slider not sliding…’ is closed to new replies.