Prevent Hovering over sibling

Prevent Hovering over sibling

I have this DOM:

I have this DOM:

<div class="container">
  <img src="" />
  <div class="nav">
    <div class="left"></div>
    <div class="right"></div>

Now I create this jquery function:

  $('img').css('width', 'auto');

But if I hover on the div nav it stopped to work. How can I prevent this behavior? Thank you.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

How to Create an autoplay Testimonial Slider with jQuery and CSS

How we can create a testimonial slider using jQuery and CSS? Solution: Responsive Testimonial Slider With jQuery and CSS, an Automated Slider which slides automatically.

How to Check Password Strength with JavaScript, CSS and jQuery

Password is most important way to secure your data.If password is weak in not so strong anybody can access your data it is very important to create a secure password wherever you need. In this post, we will create a Password Strength Checker using JavaScript,jQuery and CSS.

Should use CSS, jQuery or React to Filtering Data Client-Side

Filtering Data Client-Side. Let's look at how we might do that with different technologies is CSS, jQuery, and React