This should be doable but it depends on the way the accordion script works.
You will have to insert a custom script in your theme though (not sure if this is an option for you) in order to make the 2 plugins communicate.
‘Page scroll to id’ provides a callback function but the exact code to run depends on how exactly accordion script switches tabs.
I’m posting such (jQuery) script which should be placed at the end of the HTML (probably in footer.php or via functions.php). The script should appear after ‘Page scroll to id’ scripts. For example, if you insert it in footer.php, it should be added after wp_footer()
function.
<script>
(function($){
$(window).load(function(){
$(document).data("mPS2id").onComplete=function(){
//get the clicked link
var elem=$(".mPS2id-clicked"),
//get the id value of the clicked link (without the hash)
val=elem.attr("href").split("#")[1];
//check if the id value exists as an accordion element and set/change the URL hash accordingly
if($("#"+val).length && $("#"+val).parents(".accordion").length){
//set the value as location hash in the address bar
if(history.replaceState){
//if supported, avoid registering the URL change in borwser's history
history.replaceState(null,null,"#"+val);
}else{
location.hash="#"+val;
}
}
}
});
})(jQuery);
</script>
Let me know ??