Small JavaScript Bug
-
Hello, I have discovered a small issue in ssb-script.js
$(document).on('click', '.ssb-share a', function() { var ssb_site = $(this).attr('class'); var post_id = $(this).parent().attr("post_id"); var count = parseInt($(this).children('.count').text()); $.ajax( { type:"POST", url:ssb_ajax.ssb_ajaxurl, data: { action:"ssb_ajax_form", ssb_site:ssb_site, post_id:post_id }, success:function(data) { $('.ssb-share-'+post_id+' a.'+ssb_site).children('.count').text(count+1); $('.ssb-share-'+post_id+' a.'+ssb_site).prop('disabled',true); $('.ssb-share-'+post_id+' a.'+ssb_site).css('cursor','not-allowed'); } }) });The post_id attribute is not passed because in the default style the parent of the ‘a’ element is another ‘div’, which has no attribute ‘post_id’, instead that div’s parent has the ‘post_id’ attribute.
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Small JavaScript Bug’ is closed to new replies.