views:

104

answers:

4

This code should i place this code at bottom of body it's in conditional comment.

<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta2)/IE7.js"&gt;&lt;/script&gt;
<![endif]-->
A: 

You can put that code in the <head> tag and it will work.

But it can go anywhere.

Finbarr
it's a library which change browser behaviour IE6 like IE7, should i placeat bottom or at top in <head>
metal-gear-solid
i know i can put in <head> but it's a best-practice to put js at bottom.
metal-gear-solid
Then haven't you just answered your own question?
meder
my question was about Conditional comment
metal-gear-solid
your question after your initial question was where should you place it, followed by your comment that it's a best practice to put js at the bottom, answering it.
meder
+1  A: 

Yes. Conditional comments do not have to be in the head tag.

http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

SuperShabam
+1  A: 

Conditional comments use the syntax of normal comments: <!--[if …]>…<![endif]-->. That’s why browsers that don’t understand them ignore them. So they can be put wherever normal comments are allowed. And the script element is allowed to be child of the body element.

So you can put that conditional comment at the bottom in your body element.

Gumbo
the js file is library "IE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6. " Would it be better to put this in <head> or just before body </body>?
metal-gear-solid
@jitendra - why would it be?
Dominic Rodger
@jDominic Rodger - i mean where it will work better i will only use for IE6.
metal-gear-solid
@jitendra: I think both will work. Just give it a try.
Gumbo
A: 
       <!--[if lte Gecko 3.1]><script type="text/javascript">    
Cufon.replace('.cufonised p, H2');
    </script>  <![endif]-->

Could this work?

Nutmeg