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 8465893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:10:59+00:00 2026-06-10T15:10:59+00:00

I have two jQuery files that were conflicting with each other. I was getting

  • 0

I have two jQuery files that were conflicting with each other. I was getting the error:

Uncaught TypeError: Object 0px has no method 'css' 

After much tweaking and tinkering, I figured out how to solve this. However, I think this is not a proper solution, and I would like to get feedback on an alternate proper solution.

The files are jQuery plugin files from 1) from a template and 2) from a slideshow; both resize containers and other elements when the screen is resized.

The source of the problem is that the slideshow jquery plugin declares:

a.fn.cssOriginal=a.fn.css;

and I can read the error to lines of the template’s jquery file whenever a[c].css(“box-sizing”), or similar, is being called.

I solved this by replacing .css for .cssOriginal throughout the template’s jquery functions file. But I feel uneasy. First of all, the slideshow will only be used in some pages.

How could prevent the tempalte’s .css calls be affected from slideshow plugin file?

All of the jQuery files from the slideshow include a jQuery.noConflict(); at the end.

From the template, this section of the code was the source of the conflict:

e.matchHeight = function (a, c, f) {
    var j = e(window),
        h = a && b[a];

    if (!h) {
        var h = b[a] = {
            id: a,
            elements: c,
            deepest: f,
            match: function () {
                var a = this.revert(),
                    b = 0;

                e(this.elements).each(function () {
                    b = Math.max(b, e(this).outerHeight())
                }).each(function (c) {
                    var d = "outerHeight";
                    "border-box" == a[c].css("box-sizing") && (d = "height");

                    var g = e(this),
                        c = a[c],
                        d = c.height() + (b - g[d]());

                    c.css("min-height", d + "px")
                })
            },
            revert: function () {
                var a = [],
                    b = this.deepest;

                e(this.elements).each(function () {
                    var c = b ? e(this).find(b + ":first") : e(this);
                    a.push(c.css("min-height", ""))
                });

                return a

            },
            remove: function () {
                j.unbind("resize orientationchange", k);
                this.revert();
                delete b[this.id]
            }
        }, k = function () {
            h.match()
        };

        j.bind("resize orientationchange", k)
    }

    return h
};

and from the slide show, this section of the code is the source of the problem:

a.fn.cssOriginal=a.fn.css;

    a.fn.css=function(c,d){

        var e=this,f={};
        if(typeof c=="string")if(d)f[a.camelCase(c)]=d;
        else return e.cssOriginal(c);
        else f=c;
        f=a.cssPropertySupporter(f);
        var g=a("body").data("cssPerspective");
        if(f.transform)a.each(b,function(a,b){var c=b+(b?"T":"t")+"ransform";
        var d=f.transform;
        f[c]=(g&&!/perspective/gi.test(d)?"perspective("+g+") ":"")+d});
        e.cssOriginal(f); 
        return e

    }

Thank you

  • 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-06-10T15:11:00+00:00Added an answer on June 10, 2026 at 3:11 pm

    I think that you are including slideshow jquery-plugin first and template jquery-plugin later in your page. If that is the case, can you include one liner java-script in between both plugins? That one liner script may contain something like below:

    a.fn.css=a.fn.cssOriginal;
    

    I have not tried it, but just give it a try as this should work.

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

Sidebar

Related Questions

I have two JavaScript files that contain a jQuery function with the same name
Here I am trying to implement the jQuery I have two main files one
So I have two jquery functions that bassically do the same, but on 2
I have two files that are exact in coding, file A and B. Within
The problem: I have a jQuery heavy page that has a built in admin
i have two files. In first (parent, address: www.myaddress.com/fun/test.php) is jQuery function: <script type=text/javascript>
I have two jQuery functions. The first one below I want to run first,
I have two jquery ui datepickers in my page and I would like to
On my website I have two jQuery UI dialogs. One dialog just shows gif
Assuming I have the following two JQuery functions - The first, which works: $(#myLink_931).click(function

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.