Link to home
Create AccountLog in
Avatar of movieprodw
movieprodw

asked on

Addthis JS Change Address

Hello,

I have this:

var surl = 'http://www.domain.com/share/b' + $('#slide-show1 .cId').val() + '/s' + $('#slide-show2 .cId').val();
            addthis_share.url = surl;
            $('#share-link').val(surl)

Open in new window


and it populates a form input text field.



I want to add the addthis share box and I would like it to populate the url part of their link.

Can you please let me know how to do that.

their link (addthis:url is what I need to change)

<a class="addthis_button" id="share-link2" href="http://www.addthis.com/bookmark.php?v=300&pubid=movieprodw" addthis:url="http://www.domain.com/" > <img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>


Note that I was using this, but could not figure out how to get it to work

<script type="text/javascript">
var addthis_share = {
    url: "THE URL"
}
</script>
ASKER CERTIFIED SOLUTION
Avatar of sivagnanam chandrakanth
sivagnanam chandrakanth
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of movieprodw
movieprodw

ASKER

Perfect