0

I tried some old answers from other questions, but none of them resolved my case. The toggle function is not working fro me. Below is the jquery:

jQuery(document).ready(function($) {

    $(".team-member").click(
    function() {
        $(this).children(".description").toggle();
    }
);
});

HTML:

<div class="team-member" data-style="meta_below">
    <img alt="yes" src="source/to/img.jpg" title="Candice Rauter">
    <h4 class="light">Name</h4>
    <div class="position">Position Goes Herer</div>
    <p class="description">blablabla</p>
</div>

Link for the section of the website(#our-team section).

Any help would be appreciated! Thanks!

Marcio
  • 307
  • 5
  • 15

1 Answers1

0

When you inspect your site on mobile, using sdk and Chrome, you get

Ignored attempt to cancel a touchend event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

warnings on your page.

Try using .on('click') rather than .click()

$(".team-member").on('click', function(){
    $(this).children(".description").toggle();
});

This should work even for dynamically added elements. And I think your page is using ajax to load its content (from what I can see in the inspector).

Community
  • 1
  • 1
dingo_d
  • 11,160
  • 11
  • 73
  • 132
  • thank you for your answer, but still not working. Any other recommendations? Thanks – Marcio Nov 28 '15 at 08:01
  • Since you are using salient, try asking the official support. It's hard to know what they added in their code that could affect this :\ – dingo_d Nov 28 '15 at 08:04