WordPress.org

Ready to get started?Download WordPress

Forums

Mini twitter feed
[resolved] jQuery conflict (5 posts)

  1. paulkrix
    Member
    Posted 2 years ago #

    Great plugin, love it.
    However WordPress uses jQuery in noConflict mode so using the $ in your javascript can cause conflicts (as happened to me).
    If you just change line 92 of mini-twitter-feed.php from:
    $(".content_tweets_'.$this->get_field_id('id').'").miniTwitter({
    to:
    jQuery(".content_tweets_'.$this->get_field_id('id').'").miniTwitter({
    then it works well for me.

    http://wordpress.org/extend/plugins/mini-twitter-feed/

  2. hectopod
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you for your message! It will be added in the next update.

  3. avioli
    Member
    Posted 1 year ago #

    By the way you are using wp_deregister_script('jquery'); and then loading the latest version from Google's Ajax Library - this is not a wise move.

    I do have scripts that don't work with the latest version and your plugin is forcing my website to use it.

    Better use simply wp_enqueue_script('jquery'); or check jquery version within your script if you require latest and greatest and notify the user of your implied version!

    global $wp_scripts;
    if ( isset( $wp_scripts->registered['jquery'] ) && ( version_compare( $wp_scripts->registered['jquery']->ver, '1.7.2', '>=' ) ) ) {
      print_r('go go go');
    }
  4. avioli
    Member
    Posted 1 year ago #

    BTW if you put the last bit of code inside a wp_enqueue_scripts action, you'll ensure that $wp_scripts is ready to use.

  5. hectopod
    Member
    Plugin Author

    Posted 1 year ago #

    BTW thank you for your messages, I will check it and find a way to not force the use of the last jquery version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic