JQuery not working in wordpress

Since WordPress version 2.x, jQuery is a build-in JavaScript library, explicitly include the jQuery library into WordPress is not necessary.

$(document).ready(function(){
  alert('test');
});

the above code will be giving an error in the console of your code:

$ is undefined

In WordPress, the $() syntax is always used by other scripting library, and causing the conflict issue and fail to call the jQuery function. You should use jQuery() instead…

jQuery(document).ready(function(){
  alert('test');
});

Alternatively, you can use noConflict()

$j=jQuery.noConflict();

// Use jQuery via $j(...)
$j(document).ready(function(){
  alert('test');
});

P.S jQuery.noConflict();http://wordpress.org/support/topic/141394

Never use jQuery handy function $() in WordPress plugin. You have to use jQuery() or jQuery.noConflict() to work between jQuery and WordPress.

Source