You are here

function _lutman_header_js in SWF Tools 5

Same name and namespace in other branches
  1. 6 lutman/lutman.module \_lutman_header_js()
  2. 6.2 lutman/lutman.module \_lutman_header_js()

The jQuery code that will try to replace all elements after the page loads. This parses the JSON out of the 'data' attribute of all swftools-embed divs.

1 call to _lutman_header_js()
lutman_swftools_embed in lutman/lutman.module
Implementation of swftools_embed hook Returns the markup for the page, plus set necessary javascript.

File

lutman/lutman.module, line 66

Code

function _lutman_header_js() {
  $js = "\n    \$(document).ready(function(){\n      \$('.lutman').flash(null, {version:7}, function(htmlOptions) {\n        htmlOptions = Drupal.parseJson(\$(this).attr('swftools'));\n        \$(this).parent().prepend(\$.fn.flash.transform(htmlOptions));\n        \$(this).remove();\n      });\n    });\n    ";
  return $js;
}