$(window).load(function() {
var shareBtn = $('.share-news-content'),
shareBox = $('.share-news-content-box'),
closeIco = 'http://mysite.com/assets/icons/share-color-24.svg',
closeBtn = $('.share.on-click');
$(window).scroll(function() {
if (window.scrollY > 70) {
shareBtn.addClass('pos-fixed share');
} else {
shareBtn.removeClass('pos-fixed share');
}
});
$(shareBox).each(function () {
$(shareBtn).on('click', function(){
$(shareBox).addClass('in');
$('.share-news-content > img.ico').attr('src', closeIco);
$(this).addClass('on-click');
console.log('click')
});
// if($(shareBtn).data('clicked')) {
// console.log('rrrrr')
// // code here
// }
if ($('.share.on-click').length) {
console.log('heyyy');
};
});
});