5492 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Australia
  • Author Level 3
+5 more
Australia
says

Just created this fiddle Test Link

I am getting error : TypeError: $allextended.slideUp() is not a function

I have to be totally honest , this isnt all my code. So just need help, fixing console error. Declaring function

320 posts
  • Weekly Top Seller
  • 3 Years of Membership
  • Exclusive Author
  • Author Level 6
+4 more
SuggeElson
says

Warp js code with Dom ready function

5492 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Australia
  • Author Level 3
+5 more
Australia
says

Warp js code with Dom ready function

wrap ?

okies hmmm

So now I have:

$(document).ready(function() {
    $('.holder').on('click','a',function(e){   
        e.preventDefault();
        var $allextended = $(this).closest('.wrapperdoo').find('.extended'),
            $extended = $allextended.eq( $(this).index() ),        
            doIt= ($extended.is(':visible')) ? $extended.slideUp() : ($allextended.slideUp()) ($extended.slideDown());   
    });
});

Still same error

1832 posts
  • Beta Tester
  • Trendsetter
  • United States
  • Copyright Ninja
+6 more
plugindistrict
says

It works for me on Chrome. You must have found the fix?

332 posts
  • Affiliate Level 1
  • Author Level 4
  • Beta Tester
  • Collector Level 1
+2 more
dekciw
says

console.log($allextended)

5492 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Australia
  • Author Level 3
+5 more
Australia
says

fix:

$('.holder').on('click','a',function(e){   
    e.preventDefault();
    var $allextended = $(this).closest('.wrapperdoo').find('.extended'),
        $extended = $allextended.eq( $(this).index() ),
        doIt = undefined;

    if ($extended.is(":visible")) {
        doIt = $extended.slideUp();            
    } else {
        $allextended.slideUp();
        doIt = $extended.slideDown();
    }  
});?
by
by
by
by
by
by