Sorry for the confusing title, I didn’t know how I could describe it better.
Anyways, here is the ‘problem’ I am currently using for my website Cufon. Which works great. However with Internet Explorer 8 it becomes really slow. Therefor I decided to use:
<![if !(IE 8)]>
<script type="text/javascript" src="js/myriad-pro.cufonfonts.js"></script>
<script type="text/javascript">Cufon.replace('.example1') ('.example2') ('.example3') ('.example4') ('.example5');
</script>
<![endif]>
This works great, however not for everything. Some parts of the scripts, which calls Cufon in the script itself, it doesn’t work and Cufon will still be displayed in IE8 (with all negative results from it).
Several included scripts / parts have the following code in it:
<?php
echo "<script language=\"javascript\" type=\"text/javascript\">";
echo "$(document).ready(function() { Cufon.replace('.orderpart1') ('.orderpart2') ('.orderpart3'); });";
echo "</script>";
?>
Now is it possible to make a same statement as with within the PHP script(s)? So if it’s any browser other than IE8 it will load the Cufon, but if it’s IE8 it will not load Cufon?
Hopefully someone understands what I mean here, cause it’s kinda hard to explain for me… 🙁
is that it ? Or did I misunderstand your request ?
Edit:
Another way, as I see that you are using jQuery, could be using jQuery browser detection :
Please note that this feature is deprecated :
If you know exactly what kind of feature are needed and aren’t implemented in IE8 i would recommend using
$.supportwhich is meant for feature detection rather than browser detection.