is there an alternative to DOMAttrModified that will work in webkit

Although Chrome does not dispatch DOMAttrModified events, the more lightweighted mutation observers are supported since 2011 and these work for attribute changes, too. Here is an example for the document body: var element = document.body, bubbles = false; var observer = new WebKitMutationObserver(function (mutations) { mutations.forEach(attrModified); }); observer.observe(element, { attributes: true, subtree: bubbles }); function … Read more

Access HTML attribute value in SASS

Sass is just a CSS generator. It doesn’t really interact with your HTML, so you can’t use HTML attributes as Sass variables. However, CSS can select based on attributes. So it will be more long-winded than you might like, but you can do something like ul[data-count=”3″]:after content: “There were three items in that list!” And … Read more