Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Does this <head> look ok to you?
Old 08-01-2010, 08:23 PM Does this <head> look ok to you?
Novice Talker

Posts: 10
Trades: 0
Any sort of jquery slider like nivo or coin that I put into my template is causing IE8 to have a huge lag slowdown. To anyone who knows what they're doing with js / html better than me, could you glance over my <'head'> section and let me know if anything looks wrong or like it might cause a problem?

Or if you can think of any other reason why the effect on these sliders would be slowing down IE that would help me out a ton.

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"><head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Blueprint by Brainbuzz Media</title>

<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="colorbox.css" type="text/css" />

<!-- dropdown menu -->
<link href="dropdown/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
<link href="dropdown/themes/stylish/default.ultimate.css" media="screen" rel="stylesheet" type="text/css" />

<!--[if lt IE 7]>
<script type="text/javascript" src="js/jquery.dropdown.js"></script>
<style type="text/css">
html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->

<!-- jquery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<!-- dropdown menu -->
<script type="text/javascript">
$(document).ready(function () {    

$('ul.dropdown ul').css('display', 'none');

    $('ul.dropdown li').hover(
        function () {
            //show its submenu
            $('ul', this).slideDown(250);
        }, 
        function () {
            //hide its submenu
            $('ul', this).slideUp(250);            
        }
    );
    
});
</script>

<!-- cufon -->
<script src="js/cufon-yui.js" type="text/javascript"></script>
<script src="cufon/Museo_Sans_500.font.js" type="text/javascript"></script>
<script src="cufon/mplus-2p_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
            Cufon.replace('h1, h3, h4, h5, h6, th', { fontFamily: 'mplus-2p' });
            Cufon.replace('h2', { fontFamily: 'Museo Sans 500' });
</script>

<!-- sliders -->
<script src="js/jquery.nivo.slider.pack.js" type="text/javascript"></script>

<!-- initialize sliders -->
<script type="text/javascript">
$(window).load(function() {
    $('#slider').nivoSlider();
});
</script>

<!-- colorbox -->
<script src="js/jquery.colorbox.js" type="text/javascript"></script>

<script type="text/javascript">
            $(document).ready(function(){
                //Examples of how to assign the ColorBox event to elements
                $("a[rel='example1']").colorbox();
                $("a[rel='example2']").colorbox({transition:"fade"});
                $("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
                $("a[rel='example4']").colorbox({slideshow:true});
                $(".example5").colorbox();
                $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
                $(".example7").colorbox({width:"80%", height:"80%", iframe:true});
                $(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
                $(".example9").colorbox({
                    onOpen:function(){ alert('onOpen: colorbox is about to open'); },
                    onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
                    onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
                    onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
                    onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
                });
                
                //Example of preserving a JavaScript event for inline calls.
                $("#click").click(function(){ 
                    $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
                    return false;
                });    
        });
</script>

<!-- IE6 png fix -->
<script type="text/javascript" src="js/jquery.pngFix.js"></script>
<script type="text/javascript"> 
    $(document).ready(function(){ 
        $(document).pngFix(); 
    }); 
</script> 


</head>

Last edited by chrishirst; 08-02-2010 at 01:10 PM..
brainbuzzmedia is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-02-2010, 12:43 AM Re: Does this <head> look ok to you?
Novice Talker

Posts: 10
Trades: 0
Solved, I believe. I think its cufon doing it.
brainbuzzmedia is offline
Reply With Quote
View Public Profile
 
Old 08-03-2010, 10:12 AM Re: Does this <head> look ok to you?
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
That's a hell-uv-a-head!

With so many calls to $(document).ready in the header, obviously returning false due to only the header being downloaded, I'm wondering if some of that js overhead could be moved to just before the closing </body> tag...

$(document).ready in the head tag is a bit redundant. Call it just before the end of the body and it's sure to be ready.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 08-04-2010, 11:04 AM Re: Does this <head> look ok to you?
Novice Talker

Posts: 10
Trades: 0
Should I just move all of the document.ready code to right before the </body> tag?
brainbuzzmedia is offline
Reply With Quote
View Public Profile
 
Old 08-05-2010, 09:38 PM Re: Does this <head> look ok to you?
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
Ya, give it a go. Should be all right.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Reply     « Reply to Does this <head> look ok to you?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17601 seconds with 12 queries