Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-01-2011, 11:44 PM   PM User | #1
WHITEB0X
New to the CF scene

 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
WHITEB0X is an unknown quantity at this point
jQuery .support() implementation

Hi Guys! I'm new to this forum and have a great question to kick things off
Can someone please take a look at the following block of code. It's a jQuery plugin that adds a hash as well as a class to the clicked link. I happen to be fading transparent PNG's and I need to EXCLUDE Internet Explorer from recognizing the fade effect as it produces a black "fuzz" when it fades. can someone teach me how to use something like this:
Code:
var FADE_TIME = 500; if(!($.support.opacity)) { FADE_TIME = 0}

$('element').fadeOut(FADE_TIME)
And Place it inside the plugin somewhere to do this? I need help quick!!

Code:
$(function() {

    var newHash      = "",
        $mainContent = $("#main-content"),
        $pageWrap    = $("#page-wrap"),
        baseHeight   = 0,
        $el;
        

    
    $("nav#footer").delegate("a", "click", function() {
        window.location.hash = $(this).attr("href");
        return false;
    });
    
    $(window).bind('hashchange', function(){
    
        newHash = window.location.hash.substring(1);
        
        if (newHash) {
            $mainContent
                .find("#guts")
                .fadeOut(200, function() {
                    $mainContent.show().load(newHash + " #guts", function() {
                        $mainContent.fadeIn(200, function() {
                        });
                        $("nav#footer a").removeClass("current");
                        $("nav#footer a[href="+newHash+"]").addClass("current");
                    });
                });
        };
        
    });
    
    $(window).trigger('hashchange');

});
WHITEB0X is offline   Reply With Quote
Old 03-02-2011, 12:04 AM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,699
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
You have to generally disable fadeIn() for IE, i. e. just invoke show() if opacity isn’t supported. Something like:
Code:
if($.support.opacity) {
  $('element').fadeIn(500);
}
else {
  $('element').show();
}
But I can’t tell you where to insert that in your code as I have no idea what it’s supposed to do.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 03-02-2011, 12:09 AM   PM User | #3
WHITEB0X
New to the CF scene

 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
WHITEB0X is an unknown quantity at this point
you can see here how I'm using the plugin
http://iamwhitebox.com/staging/arkitek
WHITEB0X is offline   Reply With Quote
Reply

Bookmarks

Tags
jquery support fadein

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 02:41 PM.


Advertisement
Log in to turn off these ads.