$(document).ready(function() {
$(".addthis_button_facebook, .addthis_button_twitter").click(function() {
return click_addthis(event, this.href)
});
});
Which actually worked fine in every browser except FireFox, this was stumping me for ages until I decided to post a question at the wonderful Stack Overflow (what a god-send that place is!), which resulted in someone immediately spotting the missing argument in my function event.
The code should've been:
$(document).ready(function() {
$(".addthis_button_facebook, .addthis_button_twitter").click(function(e) {
return click_addthis(e, this.href)
});
});
If you haven't noticed it, it is the argument in the function that is required, this can then be passed onto the function being called.
I hope this helps someone who may have a similar issue/oversight, although it's probably just me and my limited JS experience!
So thanks again to the helpful chaps at stack overflow!
No comments:
Post a Comment