0

There are about 10 jquery plugins here (In the project-Asp.Net MVC & JQuery) , there is something causing errors and conflicts in one of the plugins jcarousel

1st I got an error mentioned In the below lines :

Location :

 isVisible = this._visible.index(curr) >= 0;

Using the Error console found this error

Timestamp: 5/24/2013 7:08:21 PM
Error: TypeError: this._visible.index is not a function
Source File: http://localhost:1884/Scripts/jcarousel/jquery.jcarousel.js
Line: 826

Cause : I found "_visible" is null


2nd

I changed this._visible.index(curr) >= 0; to true to pass this error

isVisible = true
//this._visible.index(curr) >= 0;

Here the error is passed and next error happens :

Location :

    return this.items().index(item);

Error :

Timestamp: 5/24/2013 7:24:03 PM
Error: TypeError: this.items(...).index is not a function
Source File: http://localhost:1884/Scripts/jcarousel/jquery.jcarousel.js
Line: 372

The Line return this.items().index(item); is hit several times but putting a breakpoint in the below line of that never fired.


Conclusion

  1. As a guess it could be a conflict in this file maybe the word "index",
  2. This is used by Asp.Net MVC Inside a section and partial pages, not sure but want to know could it cause something like this. (Less Probable cause it's rendered exactly the same as it's equivalent Asp.Net Forms version, Just wanted to mention the way I used)
  3. Any other ideas what is the cause and how to solve it ?

  • In my Asp.net Forms project I configured the plugins to work correctly.

  • Other plugins registered before this plugin were working correctly.

  • After disabling the call to the jcarousel everything works fine.

6
  • Make sure jquery is loaded first. Then figure out what exactly this is. I found "_visible" is null is a good indication of where to start looking for problems -- with your this object. Forcing true is just ignoring previous problems in the script. Commented May 24, 2013 at 20:41
  • @Jason JQuery is the top in the scripts bundle list, and as I said other plugins before the plugin I mentioned were working correctly, I changed it into "true" to be sure of the problem and finding next clues, And I think it was helpful to be more stressed on that line and what is in. Commented May 24, 2013 at 20:44
  • @Jasen also please mention what do you think I should look over "this" object? also I said to name of the plugin if it could be handy to find what could be a good change. thanks Commented May 24, 2013 at 20:49
  • You'd have to share an example that demonstrates your error to get more specific and useful help. Commented May 24, 2013 at 20:54
  • The files are bigger than to be shared, I tried to isolate the error and it's related parts and mentioned here, The code of the plugin is here : github.com/jsor/jcarousel, I have to go now, but after returning here if I could add any other helpful info will do that Commented May 24, 2013 at 21:00

1 Answer 1

1

After lots of trials I became sure the problem is from the jcarousel itself, It had incompatibility issues with it's prior versions. downgrading of it from it's latest beta version solved the problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.