My website is using both Codeigniter and JqueryMobile. I am trying to insert a facebook share button in my website.
The button only show at the first time. However, It will be disappeared if you go to other page and back to the original one.
I discover that the below code run well under either Codeigniter or JqueryMobile. But the problem occurs if both framework are used at the same time.
<script>
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button"></div>