Skip to content

Instantly share code, notes, and snippets.

@gbakernet
Created August 20, 2010 06:52
Show Gist options
  • Select an option

  • Save gbakernet/539764 to your computer and use it in GitHub Desktop.

Select an option

Save gbakernet/539764 to your computer and use it in GitHub Desktop.
//Duck Punch jQuery SWFObject into submission and then hook it up on a date with SWFAddress
(function($){
var _oldFlash = jQuery.fn.flash;
$.fn.flash = function(){
var ret = _oldFlash.apply(this,arguments);
this.each(function(){
var $flash = $(this).find('object').andSelf().filter('object');
if (typeof SWFAddress != 'undefined') {
SWFAddress.addId($flash.attr('id'))
}
});
return ret
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment