This is my HTML:
        <p class="first">blah blah <a href="" class="more">read more</a></p>
        <div class="read_more">
            <p>more text</p>
        </div>
And javascript:
$(document).ready(function(){
  $('a.more').click(function(){
    $(this).find('.read_more').slideDown();
    return false;
  });
});
Doesn't seem to do anything (read_more is set to display: none) any ideas?
Try this:
    $(document).ready(function(){
      $('a.more').click(function(){
        $(this).parent().next().find('.read_more').slideDown();
        return false;
      });
    });
Update:
Here is the demo :)
Code:
$(document).ready(function(){
  $('a.more').click(function(){
    $(this).parents().find('.read_more').slideDown('slow');
    return false;
  });
});
You could also do:
$(document).ready(function(){
  $('a.more').click(function(){
    $('.read_more').slideDown('slow');
    return false;
  });
});
Or this:
$(document).ready(function(){
  $('a.more').click(function(){
    $(this).parent().next().slideDown('slow');
    return false;
  });
});
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With