0
votes

Here is the link to my jsfilddle:

http://jsfiddle.net/np7J7/2/

There, everything works.

When I put what is in jsfiddle into wordpress, I get there error:

"Uncaught TypeError: Property '$' of object [object Object] is not a function"

Chrome says the problem is with the third line here:

jQuery(document).ready(function() {
    $("ul#SMKT").liScroll();
});

I've searched and tried every solution. Nothing seems to work without causing another error. I've disabled any other plugins and jquery stuff that might cause problems.

2

2 Answers

5
votes

Wordpress uses jQuery in compatibility mode to avoid using the dollar (which is also used in other frameworks like Mootools).

Use jQuery instead of $.

So try:

jQuery(document).ready(function() {
    jQuery("ul#SMKT").liScroll();
});
1
votes

A better approach is

jQuery(function($) {
    $("ul#SMKT").liScroll();
});

the onReady handler receives the jQuery instance as a parameter