A Tale of Backgrounds, Absolutes, mouseleave, and mouseenter

Posted by: K. Scott Allen, on 18 Aug 2011 | View original | Bookmarked: 0 time(s)

mouseleave is simple to understand: Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. How hard could it be? http://jsfiddle.net/JP6aV/ $(function () { var output = $("#output"); $("#content") .mouseenter(function (e) { output.text("I'm in!"); }).mouseout(function (e) { output.text("I'm out!"); }); }); Like many simple things there are some traps under different circumstances. For example, when...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: JavaScript | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 399 | Hits: 9

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD