Why doesn’t this jQuery code work?
$(document).ready(function () {
$('currentPage').click(function() {
$('myaccount').slideDown('slow', function() {
// Animation complete.
});
});
});
<li><a class="currentPage">Home</a></li>
<li><a class="myaccount">My Account</a></li>
Anyone got any ideas? I don’t.
We use dots to select classes:
$('.class_name')In your version, it’s looking for
<currentPage>tag.edit
An example.
It might seem ‘not working’ because myaccount link is already visible, so sliding it down won’t change a thing. Thus, I’ve hidden it in the example above.