Make your sharing widget! Sharrre is a jQuery plugin that allows you to create nice widgets sharing for Facebook, Twitter, Google Plus (with PHP script) and more.
Suppose you use a class for sharrre so you can set up sharing blocks in more than one place on a page. For example, putting sharing links at the top and bottom of articles. You will write something like this.
Doing this will send one request to each site (Google+, Facebook, Twitter) for each element to which the sharing links are applied. (M * N requests, where M is the number of elements and N is the number of sharing sites.) I suggest that instead, sharrre should send one request for each site, and then apply the results to all of the matched elements. (N requests)
Suppose you use a class for sharrre so you can set up sharing blocks in more than one place on a page. For example, putting sharing links at the top and bottom of articles. You will write something like this.
Doing this will send one request to each site (Google+, Facebook, Twitter) for each element to which the sharing links are applied. (M * N requests, where M is the number of elements and N is the number of sharing sites.) I suggest that instead, sharrre should send one request for each site, and then apply the results to all of the matched elements. (N requests)