Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scribd/flash_heed
Fixes all Flash elements on a page so that they heed DOM stacking order.
https://github.com/scribd/flash_heed
Last synced: 3 months ago
JSON representation
Fixes all Flash elements on a page so that they heed DOM stacking order.
- Host: GitHub
- URL: https://github.com/scribd/flash_heed
- Owner: scribd
- Archived: true
- Created: 2010-11-13T17:48:56.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2010-11-16T20:21:43.000Z (about 14 years ago)
- Last Synced: 2024-06-22T22:04:45.825Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 45
- Watchers: 10
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
FlashHeed: Fix Flash Ads That Go Above Your Content
===================================================Tired of flash ads (or other flash content) that ignore z-index and go over your DOM content on the page? Use FlashHeed to fix them.
The issue is that flash elements that don't specify a `wmode`, or set `wmode` to `window` will not preserve stacking order on your webpage. In fact, they will go above any content, no matter what kind of z-index voodoo you try.
This problem is easy to solve if you deliver and own the flash content: just stick `` in your object tag and set `wmode="transparent"` in your embed tags and you're good to go. But, what if you cannot alter the flash server-side? This is a common problem with flash ads, like Google AdSense.
For these situation, FlashHeed will dynamically add these paramters, taking into account various browser quirks.
Compatibility
-------------FlashHeed has been tested in Firefox 3, Safari 5, Chrome 7, IE6, IE7, and IE8. In other words, it should work in most major browsers.
Usage
-----FlashHeed has no dependencies. Just include the script in your webpage (preferably in the ``):
``
A `FlashHeed` object will now be available.
It currently has one method: `heed`. Call it without any arguments like so:
`FlashHeed.heed();`
And it will fix up all the flash elements on a page. Or, you can pass in a scope, and it will only fix ads that are children of that DOM node:
`FlashHeed.heed(document.getElementById('container'));`
Of course, you should probably call this method onDomLoad.
That's it! Never again will your drop down menus and lightboxes be terrorized by flash ads!