IE6 Transparent PNG Fix the Drupal Way
This is the IM conversation on implementing a jQuery ie6 PNG fix. Dan's elegant solution will go below... i don't quite follow where he put everything...
dan:
http://jquery.andreaseberhard.de/pngFix/just dump it in the theme folder?
benjamin melançon:
yeahand http://api.drupal.org/api/function/drupal_add_js/5
and then of course
<head>
...
<script type="text/javascript">
$(document).ready(function(){
$(document).pngFix();
});
</script>
...
</head>has to be added to all five of your page.tpl.phps
dan:
can you gimme the exact line please?ben:
assuming you put the file directly in the your theme's directorydrupal_add_js('jquery.pngFix.js', 'theme');
dan:
just put that in the head area?benjamin melançon
no, that goes in template.phphttp://www.johnandcailin.com/blog/john/using-jquery-place-prompt-text-your-exposed-drupal-filters
hmm, looks like i was counting on the 'theme' setting to find your theme, and really all it does is find the theme directory? a little strange
but if that's the case you'll have to have something like:
<?php
$theme_path = drupal_get_path('theme', 'zen');
drupal_add_js($theme_path . '/js/inlineFieldLabel.js','theme');
?>dan hak 11:53
this in what i used :
<?php
drupal_add_js(drupal_get_path('theme', 'sky') . '/jquery.pngFix.js', 'theme');
?>so there!
benjamin melançon 11:53
good for you!one second
<?php
drupal_add_js(
'$(document).ready(function(){
$(document).pngFix();
});' ,
'inline'
);
?>that last one
in template.php
may mean you don't need to edit any of the page.tpl.phps
as is
Comments
I have recently written this
I have recently written this article to show you how to export png 8 in Fireworks. http://tocs-i.com/blog/how-to-export-transparent-pngs-from-fireworks-that-have-a-small-file-size-and-work-in-ie6/
Post new comment