WordPress.org

Ready to get started?Download WordPress

Forums

Easing Slider "Lite"
[resolved] JQuery Issues (woes) (7 posts)

  1. ps1
    Member
    Posted 1 year ago #

    Hi, I posted the below in the main forum after reading of a similar problem some one else had. Maybe you have some insight. Many thanks for reading this.

    Cheers

    **************** Post **********************************

    Hi,

    Having a problem with getting Jquery style menus to work. All I get is standard text menu. It is just like the jquery does not load.

    A little bit of research has shown this is

    possibly

    caused by easing slider lite using older versions of jquery (i.e loading multiple versions) which I got from the link below.

    http://wordpress.org/support/topic/plugin-easing-slider-outdated-jquery-version?replies=3

    I could be very wrong with easing slider lite.

    To try to remedy this I installed the jquery updater plugin

    http://wordpress.org/extend/plugins/jquery-updater/

    I have checked the page source and it appears the latest version is being run.

    Strangely though I completely uninstalled all of my plugins (including easing slider lite) and added them back one by one but still could not to get it to work. Strange also because I have the jquery menu plugin working with the all the plugins on other sites.

    site: i c b w e b . com (minus spaces)

    many thanks for any help.

    http://wordpress.org/extend/plugins/easing-slider/

  2. zebrawebdesigns
    Member
    Posted 1 year ago #

    try using the code like below in the header.php
    change the jquery version according to your need.

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <?php
    if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
    function my_jquery_enqueue() {
       wp_deregister_script('jquery');
       wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);
       wp_enqueue_script('jquery');
    }
    ?>
  3. Note: @sbhuvan That's not really good advice anymore.

    1 - Don't use old versions of jquery, use the one that ships with WordPress. You'll just hurt yourself needlessly doing that. Fix the js so that you can correctly use what ships with WordPress, not change WordPress to use an old version of jquery.

    That old support topic is a year old and really is not good advice going forward.

    2 - You really don't want to modify a theme's header.php file if you can avoid it. ps1's site is not using a child theme; that looks like a copy of Twenty Eleven inside of the wp-content/themes/twentyeleven-child not the same thing and more difficult to support.

    See http://codex.wordpress.org/Child_Themes for an explanation.

    It may be too late to change it but if you do switch to a child theme then you'll enjoy the updates to Twenty Eleven when they come out. SOme of those updates are critical.

  4. ps1
    Member
    Posted 1 year ago #

    Thank you so much for the reply

    I pasted that into three different places on header.php in three different places but got no change.

    Not sure what "change the jquery version according to your need" step means. where?

    Again thank you

  5. MatthewRuddy
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @ps1, unfortunately you are incorrect.

    Easing Slider "Lite" loads jQuery using the WordPress PHP function wp_enqueue_script('jquery'), which is the correct procedure in doing so. All WordPress guidelines have been followed and I've even written a personal blog post about the correct methods in using jQuery within WordPress here.

    Using this PHP method to load jQuery ensures that the WordPress version of jQuery is only loaded once, no more. If you are seeing it being loaded twice or even three times, it is being caused by other plugins incorrectly loading it.

    If you are having problems, other plugins (or the theme) are at fault. Unfortunately a lot of plugins don't follow the guidelines and cause such issues (Easing Slider in the very early days did this, but hasn't in over a year). More often than not these are plugins that haven't been updated in quite a while.

    I also noticed on your site that you're now using jQuery v2.0, the latest version, including the migration file. Be wary that this is a very new version of jQuery that has dropped support for many old methods and functionality. This could potentially break a few plugins in the WordPress repository, and in all honestly I expect this to be a pretty major issue in the near future.

    Be sure be calling out plugins on jQuery issues. It's very serious, probably the biggest plugin support related issue encountered by WordPress developers, and false accusations can tarnish the reputation of highly active plugins. Just a word of advice I guess :)

  6. ps1
    Member
    Posted 1 year ago #

    Hi Matt,

    Firstly I would like to say it was not my intention to cause any offense. That is why if you see my post I used the words "possibly" and followed with the statement "I could be very wrong with easing slider lite.". As far as I was concerned I was not "calling out" to anybody or any thing.

    I am truly sorry and humbly offer an apology to you personally if you have construed my wording that way. Please be aware it was not meant to come across that way. Again I'm sorry.

    To fix it (and not saying this was good but it worked) I just backed up my install and re-installed wordpress. Using the exact same plugins, theme, PHP and CSS files it worked. Quickly tried all the plugins at once and all OK. Lost a few days work but the plugins all worked and will turn them all back on again as I finish it. Can only say must have been something (probably be me) with the core wordpress files (but I will stand corrected if need be)

  7. MatthewRuddy
    Member
    Plugin Author

    Posted 1 year ago #

    No need to apologise at all! :) My advice was geared towards other plugins, rather than Easing Slider. I've seen some explosive arguments over the topic so I can imagine you want to avoid those at all costs.

    It's actually good that you've posted this: it's an opportunity for users to come across it and be educated on the situation and the correct way to do things. Educating users about the issues related to using jQuery in WordPress is key to rectifying it :)

    Very surprised that re-installing did the trick. Hopefully no plugins made modifications to your WordPress install. Unlikely, but possible. Sorry to hear you've lost some of your work, I can imagine that's a real pain. Hopefully now all will remain well for the time being, and I'd definitely recommend having a look at some of the backup plugins available so you can quickly restore if needed in the future :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.