jQuery Notes

Tutorial https://www.youtube.com/watch?v=hMxGhHNOkCU&list=PLoYCgNOIyGABdI2V8I_SWo22tFpgh2s6_ $(document).ready(function() = $(function() { }); Highlight Selected Item <div id=”menu”> <ul class=’menu’> <li><a href=”#”>Panel 1</a> <li/><li><a href=”#”>Home</a></li> <li><a href=”#”>JavaScript</a></li> <li><a href=”#”>Blog</a></li> </ul></div> <!– Script –> <script> $(document).ready(function() { //$(‘#btn1’).html(‘my button’); $(‘#menu li’).click(function() { $(‘#menu li’).filter(‘.active’).removeClass(‘active’); $(this).addClass(‘active’);    });

Automatic Slider (Working Code)

From: https://www.w3schools.com/howto/howto_js_slideshow.asp <!DOCTYPE html> <html> <head> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <style> * {box-sizing:border-box} body {font-family: Verdana,sans-serif;} .mySlides {display:none} /* Slideshow container */ .slideshow-container { max-width: 1000px; position: relative; margin: auto; } /* Caption text */ .text { color: #f2f2f2; font-size: