I have a jquery code, but I’m a little bit confused on how can I put a css on this:
$(document).ready(function () {
$('span.account-menu').click(function () {
$('ul.menu').slideToggle('medium');
});
});
I wanted to add this css in the click function.
border: 1px solid #999999; background-color: #333333;
This style, I wanted to effect only in ‘span.account-menu’ and not affecting ul.menu. I try the code that you have given but the problem is when I click back the menu the style will not disappear.
You can either
manuallyby using .css()Example