Error in js file

Hello all,

I am getting an error in a theme i am using, which is causing issues with a plugin i am trying to use.
I know virtually nothing of JS, so im hoping someone can tell me how i can fix this.

here is the error i am getting:
Uncaught TypeError: Property ‘$’ of object [object Object] is not a function - custom.js line 30

the plugin it is causing problems with is here:

I tried to get support from the plugin author but was told its the error in the custom.js file in my theme.
I do not have the ability to contact the creators of the theme to ask them for support, so i turn to my sitepoint community.

Thanks in advance.

here is the full contents of the custom.js file:

/*--------DDsmoothmenu Initialization--------*/
ddsmoothmenu.init({
	mainmenuid: "menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
});
// JavaScript Document
jQuery(window).load(function(){
jQuery('#slides').slides({
	autoHeight: true,
	effect: 'slide',
	container: 'slides_container',
	play:50000,																			play: 6000,
	slideSpeed: 600,
	fadeSpeed: 350,
	generateNextPrev: true,
	generatePagination: false,
	crossfade: true
});
	jQuery( '#slides .pagination' ).wrap( '<div id="slider_pag" />' );
	jQuery( '#slides #slider_pag' ).wrap( '<div id="slider_nav" />' );
});

//Font Replace
Cufon.replace('#menu ul li a',{hover: true})('#colRight h2')('.reply',{hover:true})('h1')('h2')('h3')('h4')('h5')('h6');
//Fade images
 $(document).ready(function(){
    $(".featured_content img, .post img, .sidebar .recent_post li img").hover(function() {
      $(this).stop().animate({opacity: "0.5"}, '500');
    },
    function() {
      $(this).stop().animate({opacity: "1"}, '500');
    });
  });
  //Tipsy
  $(function() {    
    $('.social_logos a').tipsy({gravity: 's'});
  });

the issue is on this page of my site:
http://motiongraphicstemplates.com/?page_id=2

The large image in the middle of the page, when clicked, is supposed to pop up a video.

I have tested this is chrome, ff and safari on OS X and IE9 on Windows.

hello there, please read This Wordpress Codex : Link

in most cases it’s a wordpress conflict, the jquery library included with wordPress loads in “no conflict” mode. This is to prevent compatibility problems with other javascript libraries. In “no-confict” mode, the $ shortcut is not available and the longer jquery is used, Example :

jQuery(document).ready(function ($) {

So by including the $ in parenthesis after the function call you can then use this shortcut within the code block…

Goodluck

Ok i had to replace all instances of $ at the beginning of a line with ‘jQuery’
once i did that, it fixed everything.
Thanks!

You are welcome :wink: