I think I'd go with:
Code:
(function($){
var socialbasemarkup = ['Share me ',
'<a href="https://www.facebook.com/sharer/sharer.php?u"><i class="fa fa-facebook-square fa-share style6 grey"></i> </a>',
'<a href="https://twitter.com/intent/tweet?url"><i class="fa fa-twitter-square fa-share style6 grey"></i> </a>',
'<a href="https://plus.google.com/share?url"><i class="fa fa-google-plus-square fa-share style6 grey"></i> </a>',
'<a href="https://pinterest.com/pin/create/button/?url"><i class="fa fa-pinterest fa-share style6 grey"></i> </a>'].join('\n'),
dimensions = [400, 280, 600, 600];
$('.divborder.col-md-8').each(function(i, s){
var bl = '=' + $(s).find('a:first').attr('href');
$('.social h4', s).append(socialbasemarkup).find('a').each(function(i2, a){
a.href = a.href + bl;
$(a).click(function(e){
window.open(this.href, 'newwindow', 'width=600, height=' + dimensions[i2]);
e.preventDefault();
});
});
});
})(jQuery);
Then:
Code:
<tr><td><div class="social"><h4>Share me
<a href="https://www.facebook.com/sharer/sharer.php?u=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841', 'newwindow', 'width=600, height=400'); return false;"><i class="fa fa-facebook-square fa-share style6 grey"></i> </a>
<a href="https://twitter.com/intent/tweet?url=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841" onclick="window.open('https://twitter.com/intent/tweet?url=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841', 'newwindow', 'width=600, height=280'); return false;"><i class="fa fa-twitter-square fa-share style6 grey"></i> </a>
<a href="https://plus.google.com/share?url=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841" onclick="window.open('https://plus.google.com/share?url=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841', 'newwindow', 'width=600, height=600'); return false;"><i class="fa fa-google-plus-square fa-share style6 grey"></i> </a>
<a href="https://pinterest.com/pin/create/button/?url=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841" onclick="window.open('https://pinterest.com/pin/create/button/?url=https://www.property24.com/for-sale/little-falls/roodepoort/gauteng/736/104867841', 'newwindow', 'width=600, height=600'); return false;"><i class="fa fa-pinterest fa-share style6 grey"></i> </a>
</h4></div></tr>
and similar could be:
Code:
<tr><td><div class="social"><h4>
</h4></div></tr>
I was only able to partially test this, but at least there're no syntax errors. Notice though that the links on the page do NOT match the ones in your post, at least not for the main link for each property. That is on the page you have one link in main, then a different one that's a parameter of the social links. But it looks like they go to the same place, so could in theory be the same as you have them in your post. But the ones currently on the page as main links cannot be used in this script. The javascript code here could follow the code I gave you earlier, either in the same script or a separate one, as long as both are after the main markup for the page.
Let me know if you have any questions or problems.
Edit: OK, I tested this further, and seems to work.
Edit: Had a thought where one could use the links as they are on the page now. That works with Google+, probably would with the other social links. If you're interested, you can test that version:
Code:
(function($){
var socialbasemarkup = ['Share me ',
'<a href="https://www.facebook.com/sharer/sharer.php?u"><i class="fa fa-facebook-square fa-share style6 grey"></i> </a>',
'<a href="https://twitter.com/intent/tweet?url"><i class="fa fa-twitter-square fa-share style6 grey"></i> </a>',
'<a href="https://plus.google.com/share?url"><i class="fa fa-google-plus-square fa-share style6 grey"></i> </a>',
'<a href="https://pinterest.com/pin/create/button/?url"><i class="fa fa-pinterest fa-share style6 grey"></i> </a>'].join('\n'),
dimensions = [400, 280, 600, 600];
$('.divborder.col-md-8').each(function(i, s){
var bl = '=' + encodeURIComponent($(s).find('a:first').attr('href'));
$('.social h4', s).append(socialbasemarkup).find('a').each(function(i2, a){
a.href = a.href + bl;
$(a).click(function(e){
window.open(this.href, 'newwindow', 'width=600, height=' + dimensions[i2]);
e.preventDefault();
});
});
});
})(jQuery);
Bookmarks