in reply to Getting Error: Couldn't render template file error - site.tt: not found". When Run The Catalyst Application.

"Problem 2 . How to use Jquery With Catalyst Application? I put the JS file in separate folder root/static/js folder. But when i run the my application then it's showing message in error console "$ is not define". (I got the meaning of it, but unable to solve it out.) Code is following JS file "

The "$ is not defined" error is most likely a result of the jquery.js file not being referenced in the correct location. Does Firebug show any errors in the net tab? Also that's an odd mix of regular JavaScript (in your makeactive function) and jQuery code :)

Update: Also, you may want to include the jquery library prior to the Tools.js script.

  • Comment on Re: Getting Error: Couldn't render template file error - site.tt: not found". When Run The Catalyst Application.
  • Download Code

Replies are listed 'Best First'.
Re^2: Getting Error: Couldn't render template file error - site.tt: not found". When Run The Catalyst Application. And How to use Jquery with Catalyst??
by Sachin (Acolyte) on May 25, 2010 at 05:42 UTC
    I put my jquery.js file in the same folder( static/js/). Please let me know how is odd mix of regular javascript and Jquery code? If there is any best way to use it then please tell me..

      "I put my jquery.js file in the same folder( static/js/)."

      And what? Everything now works?

      "Please let me know how is odd mix of regular javascript and Jquery code?"

      You load the jQuery framework, in one section you address things in the jQuery form $('#elementID').attribute(value); yet elsewhere in your code you use the general form  document.getElementById("elementID").attribute = value;. If it does what you want then it's not a problem. It just seems like an odd mix of the jQuery framework and plain JavaScript. I tend to like things to be consistent.

      I have the same problems now. Did you have a solution? Thank you, tolq.
        The solution is to use the correct path/url