Article

Toggle color changes on mouse out/ over.

https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard

We can combine the above code with the mouseout() to revert the background color back to gray when the mouse moves out of the gray area: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/jquery%20events/ex24.js?actionable=true

<script>
$(document).ready(function(){
  XT1
});
</script>
Copy to clipboard
Send to Live Demo

Live demo

<style>.pop-up{background-color:#5d6373; padding: 1rem;}</style><div id="minidivpage" class="example-live"><div id="popUp" class="pop-up">Gray Area</div><h4 class="heading-4">Colours in a webflow list:</h4><ul role="list" class="list"><li>Purple</li><li>Blue</li><li>Magenta</li><li>Pink</li><li>Black</li><li>Red</li><li>Green</li></ul></div>

<script>    
$(document).ready(function() {
  XT1
});
</script>
<script>
  
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Your browser is too small

Resize your browser to be at least 769px wide.