• What would be the best way to disable the version of jQuery that comes with Meteor Slides?

    At the moment my theme is loading version 1.5.1 and then a few lines later Meteor Slides loads version 1.4.4. Some strange things are happening intermittently on the site and I want to rule this out as a potential cause, plus it can’t be good to load two versions of jQuery anyway 😉

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Hi Matt, if you can’t use the version of jQuery that comes with WordPress, I would deregister it and register your own copy. It shows how to do this in the documentation on wp enqueue script.

    Thread Starter Matt

    (@matm00)

    Sorry, you’ve misunderstood me – it’s the other way round 😉

    I’d like to use the version of jQuery that my theme specifies, not the version that ships with Meteor Slides, i.e. I don’t want MS to load jQuery for me as it’s already loaded. I could obviously hack your plugin, but that’s a bit messy especially if your plugin gets updated – I’d need to hack it again each time.

    Maybe you’d be able to add the ability to turn off the Meteor Slides version of jQuery on the settings page as a feature in the future?

    Plugin Author Josh Leuze

    (@jleuze)

    The code in the documentation allows you to choose a different version of jQuery, including the one in your theme, you don’t have to use the whole bit of code.

    You could just add this line to your theme, above where your theme is registering its copy of jQuery, so that it switches off the default one before adding a new one:

    wp_deregister_script( 'jquery' );
    Thread Starter Matt

    (@matm00)

    Thanks for that, I didn’t realise there was documentation in the plugin folder 🙂

    Plugin Author Josh Leuze

    (@jleuze)

    No problem!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable jQuery’ is closed to new replies.