I'm trying to utilize a navicon created using the CSS content property.
Here is the code snippet:
#nav:before {
content: '=';
}
function openNavigation() {
$('#navigation').click(function() {
$('#toggle').slideToggle(600);
$('#toggle').css({
'content': 'x'
});
});
}
window.onload = openNavigation;
<nav id="toggle">
<ul>
<li></li>
</ul>
</nav
However, this implementation is not functioning as expected. How can I revert back to the default property when the user clicks on the x
mark?