Tuesday, May 8, 2012

Jquery is not defined

You might get this error while integrating jquery in your appplication.Scripts will not get invoked.

I have to include Datepicker for a field in a page.

var $j = jQuery.noConflict();
$j(document).ready(function($) {

Got the error "jQuery is not defined"

Just changed order of the script which i included in the application. The error got resolved :)-

<%= javascript_include_tag "" %>

<%= javascript_include_tag "" %>

<%= stylesheet_link_tag "" %>

The order in which you load your scripts is important