Friday 15 August 2014

javascript - Backbone events hash vs jquery event declaration -


If I declare my events in the 'Event' hash of a Backbone view, then such: < Pre> Event: {'MouseSite Social Media Linked': 'Shosematic Media Links',' Mouseway # Social Media Container ':' Hide Social Media Links', 'Mousecenter # Social Media Container Link ':' Enhance Social Media Linked ',' MouseLove # Social Media Container Lyn Lee ':' ResetSmagic Media Link '}, // Never Showcase Social MediaLinks: Function (E) {Warning (' Enter Mouse SM '); }, // never gets hidden Social media links: work (e) {warning ('mouse left SM'); }, // Works fine Focusing Social Media Link: Function (E) {Warning (emphasizes 'SM'); }, // works fine reset social media: function (e) {warning ('reset sm'); },

The first two incidents have failed in the fire, but the last two work is fine. The only difference is that the selector specifies a sub-element (example: #socialMediaContainer.links li , but I'm not sure why it will make a difference.

The relevant HTML source is as follows:

  

No comments:

Post a Comment