0
I would like to remvover the href of an element only in the mobile version, which would be at 769px, the href that I would like to remove is from a menu, this menu is the same as the desktop version, only gets another css when entering at 769px, I tried to add a new class when entering 769px to be able to modify this href without having to go through the desktop menu, only it doesn’t work, when it comes back the desktop version is with href removed.
That class .menu-mobile
only exists at 769px and disappears after passing 769px,
but since the menu is the same in both sizes it only gets one more class, I believe this is the reason why it doesn’t work, because it comes back it only loses the class, but the change is already made so losing this class has no effect whatsoever. How could I fix this?
Remove href only at 769px.
Code I tried to use
$j(document).ready(function() {
$j('.menu-mobile a').removeAttr('href');
});
Face exactly this thank you so much!! I needed to save the value to be able to use it again while resizing the screen, thanks.
– Snake