Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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');
    
    });

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,925
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can see here how I'm using the plugin
    http://iamwhitebox.com/staging/arkitek


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •