0

Hi i am using bootstrap accordion to display data and i am using facebook share button to share my post in social media but not able to show the share button.Here is my code.

<?php if(isset($records2) && is_array($records2)):?>
                <?php foreach ($records2 as $r):?>

                <div class="digitalmarketingassociate">
                  <span class="digit"><?php echo $r->job_name ;?></span>
                  <div class="applynow">Apply Now</div>
                  <div class="moreinfo accordion" >More Info</div>
                    <div class="panel">         

                            <h3 class="job">Job Description</h3>
                            <p class="jobdes"><?php echo $r->job_description ;?></p>

                            <h3 class="job">Desired Skills & Experience</h3>
                            <p class=""desiredskills"><?php echo $r->skills_experience ;?></p>

                            <h3 class="job">Educational Qualification</h3>
                            <p class="educationalqua"><?php echo $r->qualification ;?></p>

                            <h3 class="job">Roles and Responsibilities</h3>
                            <ul class="rolesand">
                                <li class="rolesandres"><?php echo $r->roles_responsibilities;?></li>
                            </ul>

                            <h3 class="job">What we offer</h3>
                            <p class="whatweoffer"><?php echo $r->what_we_offer ;?></p>                                

                            <h3 class="job">How to apply</h3>
                            <p class="howtoapp">Email us your resume along with your Linkedin profile on <a href="mailto:hrmanager@xxxxx.com" class="hrmanager">hrmanager@xxxxxx.com</a> Alternatively, you can also apply via <img src="<?php echo base_url();?>theme/images/testimonial/linkedin.png" alt="linkedin" /></p>

                            <h3  class="job">Share this job</h3>                                
   <div class="fb-share-button" data-href="<?php echo base_url()?>career/careers/<?php echo $r ->jobs_id ;?>"data-layout="button_count"></div>
                            <a href="https://twitter.com/share" class="twitter-share-button" data-show-count="false">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
                            <span class="linkedincount"><script type="IN/Share" data-url="<?php echo base_url()?>career/careers/<?php echo $r ->jobs_id ;?>" data-counter="right"></script></span>
                            <div class="g-plus" data-action="share" data-height="24" data-href="<?php echo base_url()?>career/careers/<?php echo $r ->jobs_id ;?>"></div>

                    </div>

                </div> 
                <?php endforeach ;endif;?>

Here i have used so it is not able to show the facebook share button in accordion function.

Clicking on More Info button it will show more information regarding the post which we have posted.But here it is not displaying the facebook share button or linkedin share button etcc.. If i remove the then it will display the social media share buttons.It will display total information of the post if we are not using then but it should not show in that format.It should show only job name once we click on more info then only it should display the information of the post including sharing options.

Ashalatha
  • 89
  • 1
  • 14
  • Does it show if you put it outside? – Aslam Apr 11 '17 at 09:26
  • If i remove
    then it is working fine else it is not showing that share option.
    – Ashalatha Apr 11 '17 at 09:32
  • It is because the panel body is not visible in the DOM. Is it display:none initially? – Aslam Apr 11 '17 at 09:38
  • No it is not display:none – Ashalatha Apr 11 '17 at 09:39
  • What type of accordion is it then? – Aslam Apr 11 '17 at 09:40
  • @hunzaboy sorry at the beginning it will display only job name and the panel body will be display:none once i click on more info button it will show the information in the panel body except scoial sharing buttons. – Ashalatha Apr 11 '17 at 09:47
  • The SDK ignores elements that are not visible at the time of its initialization. If you want to get such elements parsed as well, you need to call FB.XFBML.parse when they become visible for the first time. http://stackoverflow.com/a/29134477/1427878 – CBroe Apr 11 '17 at 09:50
  • @Ashalatha, Tha's the issue. Refer to the link shared above. – Aslam Apr 11 '17 at 09:52
  • Another approach is to use opacity and visibility instead of display property. – Aslam Apr 11 '17 at 09:53
  • @hunzaboy actually i am using codeigniter php i need to call FB.XFBML in the html file itself.It is not only for facebook twitter,linkedin,google plus it is not displaying any one. – Ashalatha Apr 11 '17 at 09:57
  • @hunzaboy i am not getting to which class property i need to use opacity or else visibility properties. – Ashalatha Apr 11 '17 at 10:01
  • @hunzaboy can you edit in my question it will be helpful for me – Ashalatha Apr 11 '17 at 10:06
  • Anyone who can sort out my problem it will be really helpful thank you in advance – Ashalatha Apr 11 '17 at 10:12

0 Answers0