After implementing the following JavaScript code:
<script type="text/javascript>
$(document).ready(function () {
$('#social-share').dcSocialShare({
buttons: 'twitter,facebook,linkedin,digg,stumbleupon,delicious,pinterest,buffer,print,email',
offsetLocation: 0,
center: 625,
floater: false
});
var a = $('#dcssb-1');
buttonPosition(a);
$(window).scroll(function () {
buttonPosition(a);
});
});
function buttonPosition(obj) {
var top = $(document).scrollTop();
var p = top > 400 ? { marginTop: '20px' } : { marginTop: (400 - top) + 'px' };
obj.css(p);
}
</script>
Encountering an error when placing the code in either a MasterPage or a Page that uses a Masterpage:
Error Message: Object doesn't support property or method 'dcSocialShare'
All necessary JS files are correctly included on the page, yet I only encounter this issue when utilizing it within a masterpage or a page linked to one. Why is this error specific to placement within a masterpage or its associated pages?