function lalo () {
$('<ul id="lalo-uno"><li>UNO</li></ul>').appendTo('body');
}
function lalo2 ( ) {
$('<ul id="lalo-dos"><li>DOS</li></ul>').appendTo('body');
}
window.onresize = function () {
if (window.innerWidth > 500) {
lalo2();
} else {
lalo();
}
}
2 days ago I can not solve this, help please! My above code works but there is a problem. When the width of the browser is greater than 500, it shows me the function LALO2 () and when it is smaller it shows me LALO (), the problem is that when it shows me a function it does not take away the previous one, and that's what I want, that delete the other one, as if it were a hover effect, that when you enter it adds a color and when it comes out it is removed ... the same thing but with the functions.