This should be straightforward but I cannot get it to work.
My HTML is:
<span class="more-button" onclick="homePageMore()">[read more...]</a>
And the function is:
function homePageMore(){
$(this).hide('slow');
$("#home-page-more").slideToggle('slow');
}
The div I’m targeting slides down just fine, but the span that I want to hide (which I’m trying to select with $(this)) will not hide. Why not??
Take the JS out of the DOM. You’re not even passing
this:Javascript: