Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6209155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:56:01+00:00 2026-05-24T05:56:01+00:00

I have JS code like so: var li = $(li[attribute=foo]); if (li.length) { li.show(slow);

  • 0

I have JS code like so:

var li = $("li[attribute=foo]");
if (li.length)
{
  li.show("slow"); // Fails
}

I see:

Error: Object doesn't support this property or method

show() with no arguments works.

Same for fadeIn() or scrollUp(). I’ve also noticed closest() fail on another element. All these work in Firefox.

I’m suspicious that this is because the content in question is within an iframe (jquery itself is included in the outer page), but all other jquery in the iframe works, and from the IE debugger’s point of view, the li exists and has a show method available with arguments.

Any ideas what’s going wrong, or how to work around this, would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:56:03+00:00Added an answer on May 24, 2026 at 5:56 am

    As per the comments above, this was nothing to do with the version of jquery or the iframe, but was because of some JS on my page in the form:

    Object.prototype.someCustomFunction = function( aObjects ) { ...}
    

    It’s worth sharing how I solved this in case it helps anyone. The secret was to get the full version of jquery, not the obfuscated and compressed one, so I could debug more easily what was going wrong in jquery.

    What I found was that in Sizzle.filter, jquery iterates like so:

    for ( var type in Expr.filter ) { 
        if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
            ...
        }
    }
    

    The point is that jquery is expecting to find ATTR, CHILD, CLASS etc as the type. But it also finds someCustomFunction. And someCustomFunction doesn’t have an exec, so it falls over.

    The hack fix for now is to just introduce an empty exec method for jquery to find. e.g.

    Object.prototype.someCustomFunction.exec = function( expr ) {}
    

    Longer term, I’ll want to restrict someCustomFunction to where it’s actually required, rather than just Object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code like this: var newMsg = new Msg { Var1 = var1,
I have code like this var MyObj = { f1 : function(o){ o.onmousedown =
I have code like that: var xPola = 10, //how many cols yPola =
When we have code like: function a(){ var x =0; this.add=function(){ alert(x++); } }
This is a really basic question but... I have some code like this var
If I have code like this: public XALServiceConfiguration CreateInstance() { var config = ConfigurationManager.GetSection(ConfigurationSectionName)
I have some LINQ code that generates a list of strings, like this: var
I have code like this: template <typename T, typename U> struct MyStruct { T
I have code like this to move the player in my game left, right,
I have code like: @notifications = Notification.find_all_by_user_id(@user.id, :order=>'deliver_by DESC', :conditions=>deliver_by >= '#{Date.today.to_s(:db)}') logger.info @upcoming_reminders[0].inspect

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.