WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[Plugin: AddThis] ag.href is undefined in async mode (3 posts)

  1. Jacob N. Breetvelt
    Member
    Posted 2 years ago #

    I load addthis in async mode:

    http://s7.addthis.com/js/250/addthis_widget.js#async=1

    Addthis is initialized with:

    jQuery(document).ready(function(){
    	addthis.init();
    });

    When executing addthis.update('share', 'url', url); to change the url during runtime, i get the js error ag.href is undefined.
    The url is changed, but execution stops so a subsequent addthis.update('share', 'title', title); will not be performed.
    Issuing the addthis.update('share', 'title', title); first produces the same error.

    Do i do something wrong or is there a better way to change url and title during runtime (asynchronously) without js execution stop?

    http://wordpress.org/extend/plugins/addthis/

  2. Jacob N. Breetvelt
    Member
    Posted 2 years ago #

    I did some more testing, also in normal load (sync) the same problem.
    The example from the API guide:

    var url = "http://example.com/new/url";
    var title = "New title!";
    addthis.update('share', 'url', url);
    addthis.update('share', 'title', title);
    addthis.update('config', 'ui_cobrand', 'New Cobrand!');

    simply crashes during the first addthis.update with the ag.href undefined error.

  3. Jacob N. Breetvelt
    Member
    Posted 2 years ago #

    Since a few days the errormessage has changed into g.href is undefined

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags