Rails + Jquery - $ is not defined
When using Rails with Jquery and you got this error("$ is not defined") trying to write some Javascript code inside script tags. Try that:
<script>
window.onload = function () {
//Javascript with Jquery code
};
</script>
Written by Cassio Cabral
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#