$("#click").on("mouseenter", whenMouseEnter); $("#click").on("mouseleave", whenMouseLeaves); function whenMouseEnter() { $("#click").html("<h2>Inside Me</h2>"); } function whenMouseLeaves() { $("#click").html("<h2>Where you goin'?</h2>"); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter