2

I'm trying to implement this solution to a SharePoint public facing site.

The timer seems to be working as I'm getting errors in browser consoles at every interval but nothing is happening:

'TypeError: next.tab is not a function'

Any thoughts?

  • That means jQuery.fn.tab is undefined, which means the jQuery version you are working on does not have Bootstrap tabs appended to it. This could be the result of many things, such as not including the bootstrap script, or order of scripts, or having several versions of jQuery on the same page – eirikb Nov 6 '14 at 11:58
  • Hmm, That seems to be the correct answer. I was using jquery 1.8.3 for the tabs and then jquery 2.1.1 for another slider element (cycle2). So now only one or the other elements works on the site. Is there a way to include both jquery to make both features work correctly? – Mike_Piercy Nov 6 '14 at 12:13
  • There are several ways, you might be able to use jQuery.noConflict. When it comes to SharePoint I usually just use requirejs (or browserify), although that might be a bit much – eirikb Nov 6 '14 at 12:24
  • Actually, I got that wrong, it seems that I am using 2.1.1 which works great for the automatic tabs solution and then at the bottom of the age I use this library ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js which is needed for the cycle2 slider to work. I've never used no conflict before. Can I use it here do you think? – Mike_Piercy Nov 6 '14 at 12:29
  • If you can stick with one version of jQuery that is the best. I'll just copy/move my top comment to question in order to snag a point. – eirikb Nov 6 '14 at 12:35
2

From comments:

That means jQuery.fn.tab is undefined, which means the jQuery version you are working on does not have Bootstrap tabs appended to it. This could be the result of many things, such as not including the bootstrap script, or order of scripts, or having several versions of jQuery on the same page.

There are several ways to get around this, such as:

  • Remove additional versions of jQuery.
  • Check that your script is included, and included after jQuery.
  • You might be able to use jQuery.noConflict.
  • Use requirejs (or browserify).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.